Setup PHPIPAM with SAML and Keycloak
In keycloak
- Set the realm IPAM will auth with
- Click
Client Scopes
on the left menu - Click
role_list (saml)
, should have saml next to it - Click
Mappers
at the top - Click
role list
- Set
Single Role Attribute
toON
and press save - On the breadcrumbs at the top, click
Client Scopes
Now you need to create the Client
- Click
Clients
on the left menu - Click
Create
on the right - Give your Client an ID
- Set the Protocol to
saml
- Set the
Client SAML Endpoint
tohttps://<YOUR URL>/saml2
- Click Save
Now you need to add a redirect URI and a base URL
- Find
Valid Redirect URIs
and addhttps://<YOUR URL>/*
- Find
Base URL
and set tohttps://<YOUR URL>
- Click save at the bottom.
Setup IPAM
- Login as an Admin
- On the
Administration
, selectAuthentication methods
- From the
Create new
button, selectCreate new SAML2 authentication
- set the
Description
- set
Client ID
to the value of the Keycloak client - set
IDP issuer
tohttps://<keycloak URL>/auth/realms/<REALM>
- set
IDP login url
andIDP logout url
tohttps://<keycloak URL>/auth/realms/<REALM>/protocol/saml
- set
IDP X.509 public cert
from the cert in keycloak- click
Realm Settings
on the left in keycloak - click
Keys
at the top - under
Public keys
, click the topCertificate
and copy the text - now paste in to
IDP X.509 public cert
in IPAM
- click
- set
Authn X.509 signing cert
to thePrivate Key
of the keycloak client- Click
Clients
on the left menu in keycloak - click the client you set for PHPIPAM
- click keys at the top
- copy the
Private Key
and past into IPAM
- Click
- set
Authn X.509 signing cert key
to theCertificate
of the keycloak client- Click
Clients
on the left menu in keycloak - click the client you set for PHPIPAM
- click keys at the top
- copy the
Certificate
and past into IPAM
- Click
- leave
SAML username attribute
blank - click Add
Published:
by Matt Horwood