website/integrations/infrastructure/phpipam/index.md
phpipam is an open-source web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management. It is php-based application with MySQL database backend, using jQuery libraries, ajax and HTML5/CSS3 features.
The following placeholders are used in this guide:
phpipam.company is the FQDN of the phpipam.authentik.company is the FQDN of the authentik installation.test-user[0-2] in place of actual usernamesadmin-permission-group in place of your company naming conventionoperator-permission-group in place of your company naming conventionguest-permission-group in place of your company naming convention:::info This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application. :::
:::info This is based on authentik 2023.3.1 and phpIPAM 1.5.2 Only settings that have been modified from default have been listed. :::
You need to ensure users and groups exist before we proceed with the next steps.
The groups are used for property mappings later to give the user the correct permission level in the application. For this documentation there is an example for each of the 3 main default permission levels and an easy way to visualise the differences between them.
Create test-user 0
Create test-user 1
Create test-user 2
Create all required groups (under Directory/Groups)
Assign groups to users for testing
admin-permission-groupoperator-permission-groupguest-permission-groupIn order to support automatic user provisioning (JIT) with phpIPAM, additional SAML attributes need to be passed. See phpipam docs for more details about specific attributes to pass.
display_name
return user.name
return user.email
is_admin
return ak_is_group_member(request.user, name="admin-permission-group")
groups
if ak_is_group_member(request.user, name="operator-permission-group"):
return "Operators"
elif ak_is_group_member(request.user, name="guest-permission-group"):
return "Guests"
modules
if ak_is_group_member(request.user, name="operator-permission-group"):
return "*:2"
elif ak_is_group_member(request.user, name="guest-permission-group"):
return "*:1"
default-provider-authorization-explicit-consent
Select Create
Edit Policy Bindings to only allow users who have the groups assigned to them access to log in. Without this, any user can log in and be given default no permissions in phpIPAM.
Select ipam-saml application
admin-permission-groupoperator-permission-groupguest-permission-groupLeave all other settings as default
Login as the local administrator account at phpipam.company
Select Authentication Methods
Select Create New > SAML2 Authentication
Leave everything else as default. Save changes
Browse to phpipam.company, select the SAML2 login hyperlink (or access directly from the authentik application menu)
From here, you should be able to log in as each of the test users and see the effects the SAML attributes have on the permissions set. These can be fine-tuned as needed by following the phpIPAM documentation, but this should be enough to get a basic permissive installation working with authentik as the SAML provider.