Closed AnuradhaSK closed 9 months ago
Describe the issue:
Create an M2M app, authorize the userstore API
Get a token with internal_userstore_view scope
internal_userstore_view
--header 'Authorization: Basic UTRnR2dzYU55TF9KMzV2TlllTVYweWRwbGlvYTpORTFoRFNINmNfNzdHQjFoNjBsOHZudlRVTW9sU2dmUlhmWDBxWEVZRzBVYQ==' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=internal_userstore_view'
curl --location 'https://localhost:9443/t/carbon.super/api/server/v1/userstores/test-connection' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 27acfa07-cfe1-3dc3-9448-bb9058518606' \ --data '{ "connectionPassword": "aaaaaaaaaa", "connectionURL": "jdbc:h2:/home/xyz/database/WSO2_DB", "driverName": "org.h2.Driver", "username": "DB" }'
Issue is with the order of resource access control defined
https://github.com/wso2/carbon-identity-framework/blob/d2dea76701a0057d5ecd9dc8e9c85f3441e8105a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml#L798-L800
<!-- Userstore Management API --> <Resource context="(.*)/api/server/v1/userstores(.*)" secured="true" http-method="POST"> <Scopes>internal_userstore_create</Scopes> </Resource> <Resource context="(.*)/api/server/v1/userstores(.*)" secured="true" http-method="GET"> <Scopes>internal_userstore_view</Scopes> </Resource> <Resource context="(.*)/api/server/v1/userstores(.*)" secured="true" http-method="PUT, PATCH"> <Scopes>internal_userstore_update</Scopes> </Resource> <Resource context="(.*)/api/server/v1/userstores/(.*)" secured="true" http-method="DELETE"> <Scopes>internal_userstore_delete</Scopes> </Resource> <Resource context="(.*)/api/server/v1/userstores/test-connection" secured="true" http-method="POST"> <Scopes>internal_userstore_view</Scopes> </Resource>
Currently the operations works with internal_userstore_create scope
internal_userstore_create
The following part should be moved `
</Resource>`
before the `
https://github.com/wso2/carbon-identity-framework/pull/5471/files
Describe the issue:
Create an M2M app, authorize the userstore API
Get a token with
internal_userstore_view
scopeIssue is with the order of resource access control defined
https://github.com/wso2/carbon-identity-framework/blob/d2dea76701a0057d5ecd9dc8e9c85f3441e8105a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml#L798-L800
Currently the operations works with
internal_userstore_create
scope