Is it possible to sync roles and permissions from LDAP to Keycloak? - active-directory

I'm have been setting up Keycloak in an test environment as an IdP, with a user federation to Microsoft Active directory LDAP.
I've been able to sync the roles with ldap-mapper and I can see the roles under Clients - 'Assigned Roles'.
My question is if this means the clients/application that we add will give the right person the right permission when they log in?
For example, if some of the users has admin permissions in AD and others not, in AD, will that permissions follow?
Thanks.

Related

Not able to access any tabs in AAD

I'm not able to access any tabs in AAD. What could be the issue?
Please check if below points can be worked around in your case.
Buttions or options being greyed out maybe because , you may not have had global admin rights/user administrator rights on the azure AD tenant. There are a few roles which can create users within the directory. You may not have any roles within the directory which permit the operations.
Reference: github issue.
Even in Azure AD free edition ,one should be able to create the users if you have proper roles .
On completion of the first 30 days of Microsoft Azure’s free trial,
your ‘Free Trial’ Azure Subscription will be disabled. To fix this,
the subscription needs to be changed to the ‘Pay-As-You-Go’ plan
instead of the ‘Free Trial’ plan which it is currently on.
For example :For applications under Enterprise application, one of the following roles: Global Administrator, Cloud Application
Administrator, Application Administrator, or owner of the service
principal.
You can check Azure AD built-in roles, and by checking the
description of role , assign the required one to manage identity .
You can Assign Azure AD roles to users to manage the identities
if you have global or role administrator rights. Approach the
admin to assign the roles .Also see custom roles in Azure AD
if needed.
Please check if this issue in - Microsoft Q&A can relate .
If issue still remains you can raise a support request in troubleshoot+support blade.

modify permissions of global administrator using graph explorer

I used Graph explorer->Logged in with Global administrator -> Modify Permissions-> chose User.ReadWriteAll,Group.ReadWriteAll,Directory.AccessAsUser.All and then select "access to your entire organization" and logged in again with global administrator
I get below error.
Selected user account does not exist in tenant 'Microsoft' and cannot
access the application 'de8bc8b5-d9f9-48b1-a8ad-b748da725064' in that
tenant. The account needs to be added as an external user in the
tenant first. Please use a different account.
How can I add permissions to global administrator user?
Since your account is a guest in the tenant, you could not use the account to query the tenant, even if you are a global admin.
For more details, refer to this post.
Credentials are only owned by a single tenant. The tenant is discovered by Graph Explorer based on domain. You cannot use Graph Explorer to query tenants your account is a guest on, it can only query the tenant that owns the account. The only way to use those creds with another tenant would be to force the OAuth uri to use that tenants ID instead of "common". This isn't supported by Explorer. You'd have to download the source an reengineer the auth process

Azure AD: how to grant permission for all users within my AD tenet

I am not an admin of my azure active directory. Currently my web api application will able to read directory data when I or any user manually going to azure portal and click `Grant Permissions'.
I set Read directory data under DELEGATED PERMISSIONS.
But, I can't go to to each user and ask for same. Is there any way to do this at once for all users of my AD tenet? Thanks!
Because you are not an admin, no you cannot grant permissions on behalf of any other users. The most you can do is grant the application permissions equal to what your user can do, which is what the "Access the directory as the signed-in user" permission does.
However, depending on the data you are trying to read, you may be able to access that data without needing other users to consent. For example, any user has the ability to grant the application the ability to read basic information about all other users in the tenant. You will need to elaborate on your scenario.

Azure AD Differential query - Detect change in Directory role assignment for a user

I am using differential query (AzureAD graph API) to detect changes in Azure AD from the last sync. I am getting all users, group memberships, manager changes. Only missing information is Directory Role assignment (e.g Billing administrator, SharePoint administrator etc).
How can I detect a change in roles of any user?
API - https://graph.windows.net/{org}/directoryObjects?api-version=1.5&deltaLink=xxxxxttttxxxxxxxx
First, if you have enabled those Directory Roles, you can use AAD Graph API operations on directory roles to list members of those roles.
GET https://graph.windows.net/myorganization/directoryRoles/{object_id}/$links/members?api-version=1.6
But, This API can also list service principals which assigned this role.

WSO2 Mapping wso2 role to LDAP group

I would like to map automatically wso2 application roles to existing LDAP groups from an Active Directory.
Example:
internal wso2 role admin is given to users resolved as
(&(objectClass=user) (memberOf=administrators)) in DC=acme,DC=com
internal wso2 role publisher is given to users resolved as
(&(objectClass=user) (memberOf=developers)) in DC=acme,DC=com
... etc
So no provisioning to do, and role mapping has not to be done manually by the wso2 administrator.
To give a user access to an interface, we just have to add the user in the right AD group (or AD mailing list, even easier).
This king of mapping is used in Nexus Sonatype (using the apache Shiro library).
https://books.sonatype.com/nexus-book/reference/ldap-sect-external-role-mapping-config.html
Is it possible to do that in WSO2?
Is it a requested feature?
Best regards
What you can do is use the role which already exists in the LDAP as itself. In the WSO2 server side, just assign the necessary permissions to that role.
For example, admin role name is defined in the /repository/conf/user-mgt.xml file as below.
<AddAdmin>true</AddAdmin>
<AdminRole>admin</AdminRole>
<AdminUser>
<UserName>admin</UserName>
<Password>admin</Password>
</AdminUser>`
Here, replace the AdminRole value with the role name that already exists in the LDAP side. Upon the first startup of the server, WSO2 will map all the admin permissions to the mentioned role.
For other roles, you can view the existing roles from the Management Console and assign required permissions to them there.
Hope this helps.
Cheers

Resources