Not able to encrypt secrets using SCS 3.x with Git
search cancel

Not able to encrypt secrets using SCS 3.x with Git

book

Article ID: 297138

calendar_today

Updated On:

Products

Support Only for Spring

Issue/Introduction

When making a POST request to the /encrypt endpoint of a config-server, it gives the following error for both normal and admin users:
Bearer error="insufficient_scope", error_description="The token provided has insufficient scope"


Resolution

There is a known bug where this error will happen when there are many spaces accessible to the user in the PCF foundation.

You can confirm you are hitting this issue by running cf curl /v2/spaces | jq .total_pages. If the response is greater than one ( > 1 ), you are impacted.

Note: If you do not have jq installed, you can leave off that part of the command and look in the response JSON for the total_pages value.

This issue is fixed in Spring Cloud Services (SCS) 3.1.10. Upgrade to SCS 3.1.10 or later version to resolve this issue.