Questions about wso2is version 5.4 and scim2 groups - scim2

I am using wso2is in version 5.4 with ldap readonly user store. I have scim2 enabled and I am able to list users via the /scim2/Users Interface as expected.
When I try to list the groups by calling the /scim2/groups Interface, only 2 groups are returned: the PRIMARY/admin group - I guess this is an internal group and another group, which is obtained from ldap.
If I list the roles (groups) from the admin console, much more roles are listed, which are imported from LDAP, oddly enough the role corresponding to the group listed by the Groups Command is not visible.
When I call the /Users command, on the console messages are logged:
[2018-02-06 12:49:02,798] DEBUG {org.wso2.carbon.identity.scim2.common.group.SCIMGroupHandler} - The group MID.Portal.Consulting is not a SCIM group. Skipping..
What does this message mean?
Another question:
The wso2 documentation states "From 5.4.0 onwards, SCIM 2.0 is supported OOTB with WSO2 IS." Have the EventListener-Entries in the identity.xml File
<EventListener type="org.wso2.carbon.user.core.listener.UserOperationEventListener"
name="org.wso2.carbon.identity.scim.common.listener.SCIMUserOperationListener"
orderId="90" enable="false"/>
<!-- Enable the following SCIM2 event listener and disable the above SCIM event listener if SCIM2 is used. -->
<EventListener type="org.wso2.carbon.user.core.listener.UserOperationEventListener"
name="org.wso2.carbon.identity.scim2.common.listener.SCIMUserOperationListener"
orderId="93" enable="true"/>
any significance?

Identity Server has 2 seperate implementations for SCIM 1.1 and 2.0. Prior to IS 5.4.0, only the SCIM 1.1 implementation is packed OOTB with the product. SCIM 2.0 implementation is available in connector store to download and install to Identity Server. From IS 5.4.0 onward, both 1.1 and 2.0 implementations are OOTB available in the product.
The issue with not showing the groups in your read-only userstore, is actually a limitation in the Identity Server. Only the group name and the members are read from userstore. Group Id and all the other metadata related to the group are maintained inside the Identity Server database. Id for the group is generated only when the group is created from the Identity Server. So SCIM group operations will not work properly with read-only userstores because of this limitation.
Edit: As your user store is readonly, there wouldn't be much of a difference in changing the EventListener. But its better to do the proper config.
If there userstore is read-write, you have to definitely do this config.

Related

How to retrieve managament groups in hierarchy (managment groups /subscription / resources in each group) using java

I'm building an application and I need to retrieve all management groups in a hierarchical style like the subscription IDs and that resource informations .
I looked up in the SDK for java :(https://github.com/Azure/azure-sdk-for-java)
but can't find anything related with my topic
I went through tones of documentations but still didn't find any significant class that can help
Refer to MSDOC to access the management group list from azure by using azure REST Api call for the list management api.
To access the above api we should have the following details:
Client ID
Client Secret
Tenant ID
With the help of above credentials, we can generate access token to access the api’s in azure.
Below is the API to generate the access token.
https://login.microsoftonline.com/<your-tenant-id>/oauth2/token
Hit the api using postman: *
Use the generated token as header in the below api to access management groups:
https://management.azure.com/providers/Microsoft.Management/managementGroups?api-version=2020-05-01
I have implemented the above scenario using java and spring boot by following the code.
Output:
In my case, I have only one management groups. So, I'm getting one management group as shown below.

Sending group custom attributes through the Okta SCIM app

Trying to create a SCIM application in Okta that would provision both users and groups.
Users seem to work as expected and I am able to push custom attributes for users to our app and also do the proper mappings.
However, I have some issues with Groups. I am using Push Group mechanism.
After I enabled the feature called Group Profiles for Universal Directory an Okta Group Profile was added to the Directory -> Profile Editors, to which I added some new attributes for groups (e.g. email, okta id).
If I create groups with these custom attributes and push them, the only information I get sent to our app is displayName and members.
This is the POST body:
{"schemas":["urn:ietf:params:scim:schemas:core:2.0:Group"],"displayName":"name of group","members":[]}
So no email or other custom attributes.
It is not clear to me how to differentiate our SCIM app attributes for users vs the ones for groups. In the attribute mappings I only see “From Okta user to My app”, and no “From Okta group to My app” and I can only choose user.attribute and not group.attribute.
Any help is very much appreciated!
I got an answer from support saying that provisioning through SCIM custom group attributes is not supported yet. The option might be available later this year, but there is no ETA.

Provide access to a third party app using Azure AD

I've installed a third party app on an AWS EC2 instance. The requirement is when user clicks the web url of this application, user should be authenticated using organization's Azure AD. Since it's a third party app I can not integrate Azure AD with it in the code. Any suggestions on how it can be achieved are welcome. I'm trying out AWS cognito service but so far it didn't work.
Please check if you have followed the steps below and if anything was missed.
Version of Azure AD- free won’t support the onboarding of enterprise apps. So we need to upgrade Azure AD.
Go to enterprise application>new application>non-gallery
application>activate for enterprise account (which is minimum
requirement ,can select premium also)>give AWS app name.
Go to single sign-on by opening the application in azure >choose the
SAML option >Download federation metadata XML as shown below.
Then go to AWS management console>>Enable AWS SSO(Only certain
regions are available to enable SSO,please check that).
Choose the identity source
Change the identity provider>>select external identity
provider>download AWS SSO SAML metadata file which can be used later
in azure side.
In IdP SAML metadata>insert the azure federation metadata file which
is downloaded previously from azure and then review and confirm .
Now go to azure portal where you previously previously created aws app name>Go to single sign on >Upload metadata file>select the file which we previously downloaded from the aws portal>click on add>then click save on basic SAML configuration.
Say yes to test sso if pop up for testing appears.
Now we can provide automatic provisioning.When new user is created in azure AD ,then it must flow in AWS SSO .We can make few users a part of AD group in order to try signin from users.
Now go to AWS Portal and click on >Enable automatic provisioning.Copy
SCIM Endpoint and access token .Go to azure side in the app
provisioning>>Select automatic in provisioning mode>>Then paste the the SCIM end point in Tenant URL and accesstoken>click on Test connection and save the configuration.
Then go for mappings >select Synchronize AAD users to custom app
sso>leave default settings>You can select required attributes
-select beside externalID mailnickname and change the Source attribute to ObjectId(choosing the unique ID on AD side to flow in
AWS)>Also edit mail>change source attribute to userprincipalname.
I. Ensure the user only has one value for phoneNumber/email
II. Remove the duplicate attributes. For example, having two different
attributes being mapped from Azure AD both mapped to
"phoneNumber_____" would result in the error if both attributes in
Azure AD have values. Only having one attribute mapped to a
"phoneNumber____ " attribute would resolve the error.
Now go ahead and map users and groups
Search for groups in portal and add groups >Security type>give a
group name ,description and membership type as assigned>click on create.
Create two or more groups in the same way if needed ,After that
these groups are to be filled with particular users for particular
group .
Now create few users .For that Search for users in portal>new user>give name >add the user to one of the created groups and assign .
After creating users and groups , go to users and groups in your
enterprise app(recommended to select groups rather than individual
and then delete unwanted users)
Go back to provisioning and make the provision status as ON.
Now do the mapping of AD group to access certain AWS accounts by
giving permission sets.
Go to permission sets and select the group or users . You can give
existing job functional access or you can create custom policies .
Now go to settings in AWS portal copy the url and open the page of
the url which redirects to the signin. Give the user credentials and
access is possibleas per the given permissions.

How does OKTA use SCIM for different user types?

I am implementing a SCIM server to integrate OKTA with my application. In my application I have two different types of users. What's the best way of handling this in OKTA?
Having looked at the SCIM v2 core schema RFC I think there are a couple of possibilities:
Use "groups"
Use "roles"
Use "entitlements"
Which of these (if any) is the best way to implement this feature? Which features are supported by OKTA? And how do you configure these within OKTA?
Okta supports provisioning to both SCIM 1.1 and SCIM 2.0 APIs.
SCIM 2.0 implements OAuth 2.0 for access control. Okta supports:
OAuth 2.0 Authorization Code Grant Flow
Basic Authentication
Custom HTTP Header
Which of these (if any) is the best way to implement this feature?
-->Use a SCIM Library like SCIM 2 SDK for Java
Which features are supported by OKTA?
Create Users
Read Users and Groups
Update Users
Deprovision (Deactivate) Users
Sync Password
And how do you configure these within OKTA?
--> Please elaborate on what "These" are?
How can you the User/Group objects I can use to implement multiple user "types"?
Different User Types are Just Different SCIM Resources.
You could differentiate user by Group Membership or OAUth 2.0 Scopes.

OneLogin Provisioning using SCIM

I am creating a SCIM complient APP for OneLogin. I have implemented SCIM API. It works fine for /Users Request.
But I am not getting what will be the format for /Groups Request and when it will be sent. In which format they are sent and How to assign groups to people. And how to apply mapping for it..I Have read this article( https://developers.onelogin.com/scim/implement-scim-api ) on provisioning for this but it doesn't give me clear insights.
Also, Can one user be in multiple groups?
The first step would be to configure your application to first enable provisioning for the Groups attibute in your SCIM connector (this tells OneLogin that your application supports Groups)
Once that's done, you should 'Refresh Entitlements' and OneLogin will call the app's groups endpoint to retrieve what groups are available to assign users to.
From there you can add Rules to the application in OneLogin that assign users to groups and users can be assigned to as many groups as you want.
Details can be found here: https://developers.onelogin.com/scim/create-app

Resources