Skip to content

Commit

Permalink
fix(jans-linux-setup): saml clients (#8234)
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Baser <mbaser@mail.com>
  • Loading branch information
devrimyatar committed Apr 4, 2024
1 parent 3bf5f6d commit 3a73cb3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions jans-linux-setup/jans_setup/setup_app/installers/jans_saml.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ def create_folders(self):
self.run([paths.cmd_chmod, '0760', saml_dir])

def create_clients(self):
clients_data = base.readJsonFile(self.clients_json_fn)
clients_data = base.readJsonFile(self.clients_json_fn)
client_ldif_fns = []
for client_info in clients_data:
check_client = self.check_clients([(client_info['client_var'], client_info['client_prefix'])])
if check_client.get(client_info['client_prefix']) == -1:
scopes = client_info['scopes_dns']
for scope_id in client_info['scopes_ids']:
scope_info = self.dbUtils.search('ou=scopes,o=jans', search_filter=f'(jansId=scope_id)')
scope_info = self.dbUtils.search('ou=scopes,o=jans', search_filter=f'(&(objectClass=jansScope)(jansId={scope_id}))')
if scope_info:
scopes.append(scope_info['dn'])
client_id = getattr(Config, client_info['client_var'])
Expand Down
2 changes: 1 addition & 1 deletion jans-linux-setup/jans_setup/setup_app/utils/db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def search(self, search_base, search_filter='(objectClass=*)', search_scope=ldap
for col, val in search_list:
if val == '*':
continue

if col.lower() == 'objectclass':
s_table = val
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scopes_dns": ["inum=F0C4,ou=scopes,o=jans"],
"scopes_ids": ["https://jans.io/scim/users.write", "https://jans.io/scim/users.read"],
"redirect_uri": ["https://%(hostname)s/admin-ui", "http://localhost:4100"],
"grant_types": ["authorization_code", "client_credentials", "password", "refresh_token"],
"grant_types": ["client_credentials"],
"authorization_methods": ["client_secret_basic", "client_secret_post"],
"response_types": null,
"application_type": "web"
Expand Down

0 comments on commit 3a73cb3

Please sign in to comment.