guides:user:saml:set_up
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
guides:user:saml:set_up [2022/09/06 09:22] – [SAML in NetYCE] pgels | guides:user:saml:set_up [2024/07/03 12:31] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Setting up SAML ===== | ||
+ | ==== What is SAML? ==== | ||
+ | |||
+ | SAML is a method of Single Sign on where you can redirect your user administration to a single Identity provider, instead of having your user management spread out a whole bunch of different applications. The two big terms you need to be aware of are: | ||
+ | |||
+ | * **Identity Provider (IDP):** A central database that contains all user data, where a user can log in. | ||
+ | * **Service Provider (SP):** An application that requires users to log in through the identity provider. | ||
+ | |||
+ | Whenever a user tries to log into the service provider, he gets redirected to the login page of the identity provider. There he can log in, and the identity provider redirects the user back to the service provider. The communication happens over SSL, using certificates in order to be able to trust each other. | ||
+ | |||
+ | ==== SAML in NetYCE ==== | ||
+ | |||
+ | NetYCE can act as a service provider. You can set it up so that users can log in through your identity provider, instead of the standard login page. If you have turned on SAML login, a button will appear on the main login page that redirects the user to your SAML identity provider. After logging in, you will be redirected to the main login page. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Users can log in both with NetYCE and SAML accounts, and a SAML account can also have a NetYCE password. If you log in with SAML and your user isn't yet known in NetYCE, a new user will be created. This user will have the Default user group, or have its group name provided through its SAML response (Note that the User group needs to be known in NetYCE). | ||
+ | |||
+ | The settings for SAML are provided in the login profiles. | ||
+ | |||
+ | === Profiles === | ||
+ | |||
+ | NetYCE login profiles can be found in the Yce_setup table. You can edit them in the Custom Data forms, if you go to the Yce_setup table. At the moment there unfortunately is no other way to modify login profiles. A login profile determines what kind of login settings are used for a given machine. There are two kinds of records in the Yce_setup table: those belonging to a profile, and those belonging to a server. We are interested here in the profile, but first you need to find the profile that your machine uses. You can find it by finding the record with your servername in the profile field and ' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | To enable SAML, find the line in your profile with parameter " | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Beyond that, you can find a number of settings for SAML in your profile. Here are the relevant ones, and what they mean: | ||
+ | |||
+ | ^ Parameter | ||
+ | |enable_saml | ||
+ | |enable_saml_logout | ||
+ | |ca_certificate | ||
+ | |metadata_filename | ||
+ | |metadata_redirect | ||
+ | |idp_issuer | ||
+ | |provider_name | ||
+ | |user_id_attribute | ||
+ | |first_name_attribute | ||
+ | |last_name_attribute | ||
+ | |email_attribute | ||
+ | |group_names_attribute | ||
+ | |grp_list_pattern | ||
+ | |||
+ | ==== Metadata ==== | ||
+ | |||
+ | If your Identity provider supports the ability to parse service provider metadata, you can find it at the url " | ||
+ | * The public ssl key of your NetYCE server | ||
+ | * The login callback url that the user will be redirected to after a successful login | ||
+ | * The logout callback url that the user will be redirected to after a successful logout | ||
+ | |||
+ | ==== Setting up SAML ==== | ||
+ | |||
+ | In order to set up SAML, you need to configure NetYCE as a service provider. This is done through the saml login profile. You need to get the public SSL certificate and SAML metadata of your identity provider and upload it to your NetYCE VM. Recommended is to upload them into the "/ | ||
+ | |||
+ | * **Callback url:** " | ||
+ | * **Logout callback url:** " | ||
+ | * **The public SSL key of your NetYCE machine:** For more information on how to generate the necessary keyfiles: [[maintenance: | ||
+ | |||
+ | For each user, we also need the following: | ||
+ | * **User id:** The user's username. This will also be the user's username in NetYCE | ||
+ | * **First name:** The user's first name. Optional. | ||
+ | * **Last name:** The user's last name. Optional. | ||
+ | * **Email:** The user's email. Optional. | ||
+ | * **Group names:** A list of the user groups the user is a member of. | ||
+ | |||
+ | === User Groups === | ||
+ | |||
+ | When NetYCE processes a logged in user's response, it looks at the list of group names returned. It then checks all of them against the NetYCE database, and assigns the user to the group with the highest user level. If it can't find any, the user is assigned to the group " | ||
+ | |||
+ | If you want to be able to filter the list of group names on NetYCE' | ||
+ | |||
+ | Note that Group names need to exist in NetYCE. Otherwise they will get ignored. | ||
+ | |||
+ | ==== Logging in ==== | ||
+ | |||
+ | When the login profile setting ' | ||
+ | |||
+ | The user logs in in the identity provider, and the identity provider takes the specified callback url and redirects the user back to it. The callback url then processes the SAML response (after validating the certificates are all correct), and logs the user into NetYCE. The user then gets redirected to the main inventory page. | ||
+ | |||
+ | ==== Logging out ==== | ||
+ | |||
+ | When a SAML user clicks on the logout button, it depends wether the login profile setting " | ||
+ | |||
+ | * If yes, then the user will be redirected to your identity provider logout page. This page then redirects to NetYCE' | ||
+ | * If no, then the user's session and cookies will be removed and the user will be redirected to the login page. The user is logged out, but the identity provider doesn' |