WSO2 API Publisher SSO with identity Server error 403 - wso2

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.

Related

Cannot update DataStudio resource connection to use service account

I have a DataStudio dashboard which contains a dataset resource connection to a BigQuery table which is currently authenticated using an individual user's account.
I want to change that to use a service account.
In order to do that, I followed this guide, which means I have:
Created a service account
Added the BigQuery Job User role to the service account
Added the Service Account Token Creator role to the service account
Added the BigQuery Data Viewer role to the service account (associated to the correct BigQuery table)
Ensured that my account is added as a Service Account User on the service account
On the DataStudio dashboard, I then navigate to:
Resource > Manage Added Data Sources > Select the specific data source > Click on the blade with the current user account being used to authenticate.
When I try to insert the service account details in the window, I see the error message below.
I've followed the link (which leads back to the original guide). The link says I need to add the Service Account Token Creator to the service account, which I've confirm through the following:
Now I'm stumped! What could be the reason why I cannot authenticate the connection using the service account?
I figured it out.
The problem was that the Service Account Token Creator role was assigned to the service account and not the service agent.
This link describes the process of setting up a service account for authenticating Data Studio data sources. Although it's got all the info there, the devil is in the detail in Step 2: Allow the Looker Studio service agent to access your service account.

The ambiguous role mapping rules for: cognito with microsoft active directory

I've encountered following error message when I'm trying to integrate AWS Cognito and AWS ElasticSearch with AD. I've setup AD and cognito integration but after login with AD-User in AD Console, I've encountered following message. But when I've created user in AWS Cognito and login with its authentication, it was working. Please let me what I've missed to configure it. Thanks.
• Check whether the user pool id and app client id from user pool configurations are correctly configured in federated identities page. Also, check whether correct template is selected for authentication to Active Directory purposes, i.e., ‘Allow access for one or more AWS accounts or IAM users’ is selected.
• Please ensure that the Amazon Elasticsearch domain has sufficient access to the authorized AD users and groups through the access control policy. Also, check the IAM roles with the exact same name as AD groups are authorized or permitted for authentication with Active Directory or not.
• If using ADFS for federated identities with Microsoft Active Directory, check the replying party SAML 2.0 SSO service URL in ADFS configuration. Also, check the claim rules in ADFS and the issuance policy in ADFS. On the AWS side in elastic search console, check the roles key configuration under optional SAML settings.
Please find the below links for more information: -
https://aws.amazon.com/blogs/security/configure-saml-single-sign-on-for-kibana-with-ad-fs-on-amazon-elasticsearch-service/
Sorry! Something went wrong during authentication between Kibana and Amazon Cognito

How to map a SAML Attribute from your IdP to an AWS Elastic Search Role?

The recently added SAML support for AWS Elastic Search solution:
https://aws.amazon.com/about-aws/whats-new/2020/10/amazon-elasticsearch-service-adds-native-saml-authentication-kibana/
Lists in its documentation that backend roles are supported:
https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/saml.html
In Okta, for example, you might have a user, jdoe, who belongs to the group admins. If you add jdoe to the SAML master username field, only that user receives full permissions. If you add admins to the SAML master backend role field, any user who belongs to the admins group receives full permissions.
If you want to use backend roles (recommended), specify an attribute from the assertion in the Role key field, such as role or group. This is another situation in which tools like SAML-tracer can help.
But some users have problems finalizing the configuration once they are done with the AWS Console.
The answer lies beyond the AWS Console and must be completed within the Elastic Search cluster with the Master User that you created either within the cluster as an Internal User, via an IAM role or by using the Master User field in the SAML configuration section of the Modify Authentication Wizard in the AWS console for Elastic Search.
You must:
Create a Backend role that matches your SAML attribute value
Create a Mapping between the new backend role and an actual Elastic Search Role
After you're done configuring your IdP by creating a custom Attribute/Claim like roles or groups and after you've configure SAML authentication integration in the Elastic search cluster.
1.-Log into Kibana using your master user
2.-Go to OpenDistro -> Security -> Roles -> The Role you want to grant access to, i.e. readall
3.-Go to the Mapped Users tab under the role screen
4.-On the Backend Roles field type the VALUE of the Azure Claim you created by following these steps: https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-enterprise-app-role-management
For reference the claim value is: user.assignedroles.
The claim key is whatever you configure your Azure Enterprise application as.
You'll have a key value pair of "Your chosen Claim Name": user.assignedroles
5.-Save the Mapping in Kibana
Using the Azure IdP log into Kibana using users with different Azure Claim assigned to them. The Open Distro Security plugin will parse the SAML token attribute find the field for user.assignedroles and map that as a Kibana Backend Role to the actual Elastic Search roles.

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.

WSO2 IS 5.4: Add a custom ROLE to Service Provider level

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.