WSO2 IS 5.4: Add a custom ROLE to Service Provider level - wso2-identity-server

WSO2 IS 5.4: In order to have a custom ROLE to Service Provider level, like ROLE_NAME=AUTH_VALUE and ROLE_VALUES=[SERVICE_1;SERVICE_2], I understand that mechanism could be implemented using Configuring Roles and Permissions for a Service Provider se here by
Adding Role Mapping button.
Could someone help/explain if that are right and if yes, which value must be entered into the fields "Local Role" and "Service Provider Role"
Any help/ideas is much appreciated, as I'm quite stumped with this.

The document that you have linked explain how you can map internal Identity Server roles (Or roles that Identity Server can access through user stores) to a custom role that is in the service provider side. For example let's say you have role named "admin" in Identity Server side, but when you send it to the service provider side, you want it to be "owner". So you can do the mapping in this section for "admin" -> "owner" so Identity Server will do the relevant conversions before the claims sent to service provider (Depends on the protocol used to communicate with service provider)
Local role means the role that is in the Identity Server side, according to above example "admin". Service provider role is the role that be used when communicate with the service provider. "owner" according to the above example.

Related

Can Service Account impersonation be done using Keys?

Can we use the Service Account Key to impersonate a Service Account?
Thanks in advance!
“Yes we can use the Service Account Key to impersonate a Service Account”
To use the Service Account key to impersonate a Service Account. Each service account is associated with a public/private RSA key pair. The Service Account Credentials API uses this internal key pair to create short-lived service account credentials, and to sign blobs and JSON Web Tokens (JWTs). This key pair is known as the Google-managed key pair. Follow the documentation on Service Account
For more information on Service Accounts:
For the gcloud invocation, all API requests will be made as the given service account or target service account in an implementation delegation chain instead of the currently selected service account. You can specify either a single service account as the impersonator, or a comma-separated list of service accounts to create an impersonation delegation chain. The Impersonation is done without needing to create ,download and activate a key for the service account or accounts.
In order to make API requests as a service account, your currently selected account must have an IAM role which includes the IAM Service Accounts.gerAccessToken permission for the service account or accounts. Refer the ImpersonateServiceAccount
The details description and usage Service account

WSO2 API Publisher SSO with identity Server error 403

I follow the guide https://apim.docs.wso2.com/en/latest/reference/customize-product/extending-api-manager/saml2-sso/configuring-identity-server-as-idp-for-sso/#configuring-wso2-identity-server-as-a-saml-20-sso-identity-provider but getting
Error 403 : Forbidden
The server could not verify that you are authorized to access the requested resource
when try to login to publisher -
The following answer applies if you are running the API Manager and Identity Server with separated User Stores configured. Apply the following configurations on top of the instructions mentioned in the Docs and try out the scenario.
Add two roles in the Identity Server named publisher and creator without any permissions and assign both to the User that you are using to log in. You can skip this part if you already have roles assigned to the User in the Identity Server to do a Role Mapping in the API Manager server.
Open the Service Provider you have created in the Identity Server and go to Inbound Authentication Configuration > SAML2 Web SSO Configuration and click on Edit. Tick the Enable Attribute Profile and Include Attributes in the Response Always and Update
Expand the Claim Configuration of the Service Provider that is created in the Identity Server and select the Use Local Claim Dialect option. Then, click on Add Claim URI and in the appeared drop-down select http://wso2.org/claims/role and tick the Mandatory Claim. Once done, update the configurations.
Open the Identity Provider that is created under the API Manager server and expand the Role Configuration section.
Click on Add Role Mapping and enter the following
Identity Provider Role: publisher (use the correct role name that you have assigned in the Identity Server)
Local Role: Internal/publisher
Click on Add Role Mapping and enter the following
Identity Provider Role: creator (use the correct role name that you have assigned in the Identity Server)
Local Role: Internal/creator
Update the configurations.
Once the configurations are saved, now try logging into the Publisher Portal of the API Manager with the specific user.

Group Based Administrators can't see Service Provider configurations

Our installation of wso2 Identity Server 5.7.1 has multiple service providers configured. The built-in admin set all of these up. We defined a group in the user-mgt.xml that is in the Primary store that has admins. These admins can sign-in as Administrators, but they cannot see the Service Providers configured by the built-in administrator account. How can the other administrators see all the Service Provider configurations?
There is a corresponding role for each SP. The users in that role can view and update the SP. By default, only the owner of the SP is assigned to that role. But you can add others to it so that they also get access to the SP.

AWS Web Identity Federation, using dynamic roles for different users

Following articles on AWS Web Identity Federation I am a bit confused as to how can I ensure that each user who executes the AssumeRoleWithWebIdentity call can assume a different role? Is that even possible?
The following are the steps (ref.):
1. Mobile or Web Application needs to be configured with the IdP which gives each application a unique ID or client ID (also called audience)
2. Create an Identity Provider entity for OIDC compatible IdP in IAM.
3. Create IAM role and define the
1. Trust policy – specify the IdP (like Amazon) as the Principal (the trusted entity), and include a Condition that matches the IdP assigned app ID
2. Permission policy – specify the permissions the application can assume
4. Application calls the sign-in interface for the IdP to login
5. IdP authenticates the user and returns an authentication token (OAuth access token or OIDC ID token) with information about the user to the application
6. Application then makes an unsigned call to the STS service with the **AssumeRoleWithWebIdentity** action to request temporary security credentials.
7. Application passes the IdP’s authentication token along with the Amazon Resource Name (ARN) for the IAM role created for that IdP.
8. AWS verifies that the token is trusted and valid and if so, returns temporary security credentials (access key, secret access key, session token, expiry time) to the application that have the permissions for the role that you name in the request.
9. STS response also includes metadata about the user from the IdP, such as the unique user ID that the IdP associates with the user.
10. Using the Temporary credentials, the application makes signed requests to AWS
11. User ID information from the identity provider can distinguish users in the app for e.g., objects can be put into S3 folders that include the user ID as prefixes or suffixes. This lets you create access control policies that lock the folder so only the user with that ID can access it.
12. Application can cache the temporary security credentials and refresh them before their expiry accordingly. Temporary credentials, by default, are good for an hour.
So from the above, in step 11, I can add dynamic resource policies to resources to allow for user specific access, e.g. for S3. Although what happens for resources which don't support resource policies?
E.g. how can I ensure that one user logging in using Google for example, gets Write access (WriteRole) to DynamoDB whereas another using logging in using the same Google IdP only gets Read access (ReadRole) to DynamoDB?
Any help will be appreciated.

WSO2 IS SSO structure

we trying to add structure for SSO using WSO2, In WSO2 we need to create general Roles and connect this roles with Service provider (Please note service provider doesn't has custom roles so connection will be on service provider level with WSO2 general roles) , in WSO2 we found way to mapping SP roles with WSO2 roles but that not help us, and ,the structure in image below :
Beleive you are saying that your SP application does not persist or maintain the roles, rather you want WSO2 server to do so.
And you want to control authorization based on the availability of these roles for an user.
In that case, WSO2 server has no value nor need to know of the permissions you've assigned to these roles. You just define all the roles you want in the WSO2 server. Then (given that you use Oauth) by using scopes (mapped against each or multiple roles) to define access levels, you can issue access tokens to the users with the relevant scopes (defines access levels) after checking for the roles assigned to them.
On the resource server, it can validate the scopes of the provided access token against the Identity Server and grant or deny resource availability.
Cheers