Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jans-cli-tui): hide realm in idp setup #9538

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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