@@ -1106,7 +1106,7 @@ def custom_swagger_ui_html():
11061106 realm: 'oauth2',
11071107 appName: 'Morpheus API Gateway',
11081108 scopeSeparator: ' ',
1109- scopes: 'openid email profile',
1109+ scopes: 'aws.cognito.signin.user.admin openid email profile',
11101110 usePkceWithAuthorizationCodeGrant: false,
11111111 useBasicAuthenticationWithAccessCodeGrant: false,
11121112 additionalQueryStringParams: {{
@@ -1517,6 +1517,7 @@ def custom_openapi():
15171517 "authorizationUrl" : f"https://{ settings .COGNITO_DOMAIN } /oauth2/authorize" ,
15181518 "tokenUrl" : f"https://{ settings .COGNITO_DOMAIN } /oauth2/token" ,
15191519 "scopes" : {
1520+ "aws.cognito.signin.user.admin" : "Read own user attributes (GetUser)" ,
15201521 "openid" : "OpenID Connect authentication" ,
15211522 "email" : "Access to email address" ,
15221523 "profile" : "Access to profile information"
@@ -1562,7 +1563,7 @@ def custom_openapi():
15621563 # Auth and Automation endpoints: OAuth2/BearerAuth only (JWT tokens from Cognito)
15631564 elif path_key .startswith ("/api/v1/auth/" ) or path_key .startswith ("/api/v1/automation/" ) or path_key .startswith ("/api/v1/billing/" ):
15641565 operation ["security" ] = [
1565- {"OAuth2" : ["openid" , "email" , "profile" ]},
1566+ {"OAuth2" : ["aws.cognito.signin.user.admin" , " openid" , "email" , "profile" ]},
15661567 {"BearerAuth" : []}
15671568 ]
15681569 # Default: All other endpoints use APIKeyAuth only
0 commit comments