Skip to content

Commit

Permalink
fix(jans-cli-tui): hide realm in idp setup (#9538)
Browse files Browse the repository at this point in the history
* fix(jans-cli-tui): hide realm in idp setup

Signed-off-by: Mustafa Baser <[email protected]>

* docs(jans-cli-tui): update IDP for TUI

Signed-off-by: Mustafa Baser <[email protected]>

---------

Signed-off-by: Mustafa Baser <[email protected]>
  • Loading branch information
devrimyatar authored Sep 19, 2024
1 parent dc7afcd commit 6580d48
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
18 changes: 12 additions & 6 deletions docs/admin/keycloak/keycloak-saml-inbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,28 @@ The following is a high-level diagram depicting a typical inbound identity user

## Configure SAML IDP
Use [Janssen Text-based UI(TUI)](../config-guide/config-tools/jans-tui/README.md) or [Janssen command-line interface](../config-guide/config-tools/jans-cli/README.md) to create new IDP Keycloak Server.
1. Navigate to Inbound SAML
1. Navigate to `Jans SAML` > `Identity Providers`

1. Click on `Add IDP`
1. Go to `Add Identity Provider` and press **Enter**

1. Enter a name (unique identifier) for this provider (letters, digits, and underscore characters allowed).

1. Enter a display name for the IDP
1. Enter a display name for the `Add Identity Provider`

1. Upload IDP Metadata using `Import Metadata from File`.
1. Upload IDP Metadata by selecting **file** for `Metadata Source Type` and press **Enter** after you navigated on **Browse** of `Metadata File`

1. Optionally provide individual metadata elements.
1. Or you can, optionally provide individual metadata elements by selecting **manual** for `Metadata Source Type`.
See adding a sample idp in the following figure
![Add Isentitiy Provider](../../assets/tui-admin-keycloack-add-idp.png)

1. Save details

SAML IDP is created in Keycloak server under default realm ,`jans-api`. IDP details are also persisted in Jans DB.
SAML IDP is created in Keycloak server under realm **jans**. IDP details are also persisted in Jans DB.

To edit IDP details later, you can navigate to the idp in the list and press **Enter**, you will get a popup screen as shown in the
figure below:

![Edit Isentitiy Provider](../../assets/tui-admin-keycloack-edit-idp.png)

## Configure IDP for inbound SAML
1. SAML IDP should have been configured as stated in above
Expand Down
Binary file added docs/assets/tui-admin-keycloack-add-idp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/tui-admin-keycloack-edit-idp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,6 @@ def get_metadata_container(value):
widget_style=cli_style.white_bg_widget
),

common_data.app.getTitledText(
title=_("Realm"),
name='realm',
value=self.data.get('realm', 'jans'),
style=cli_style.edit_text_required,
jans_help=_("realm"),
widget_style=cli_style.white_bg_widget
),

common_data.app.getTitledWidget(
_("Metadata Source Type"),
name='idpMetaDataSourceType',
Expand Down Expand Up @@ -255,6 +246,7 @@ def save(self):

provider_data = copy.deepcopy(self.data)
provider_data.update(new_data)
provider_data['realm'] = 'jans'
import_metadata_from_file = provider_data.pop('idpMetaDataSourceType', None) == 'file'

if import_metadata_from_file and not self.metadata_file_path:
Expand Down

0 comments on commit 6580d48

Please sign in to comment.