add option to netbox role for custom pipeline code for OIDC mapping
Add option to netbox role for ensuring custom pipeline code for OIDC
group and role mapping is either present or not.
The custom pipeline code is licensed under the Creative Commons: CC
BY-SA 4.0 license.
See:
https://github.com/goauthentik/authentik/blob/main/LICENSE
https://github.com/goauthentik/authentik/blob/main/website/integrations/services/netbox/index.md
https://docs.goauthentik.io/integrations/services/netbox/
5676b1a468
This commit is contained in:
parent
dbb784e2bb
commit
09a8551c8a
6 changed files with 95 additions and 2 deletions
|
@ -18,7 +18,9 @@ Should work on Debian-based distributions.
|
|||
|
||||
## Optional Arguments
|
||||
|
||||
None.
|
||||
- `netbox__custom_pipeline_oidc_group_and_role_mapping`: Whether or not to have custom pipeline code for OIDC group and role mapping present.
|
||||
See [Custom Pipeline Code for OIDC Group and Role Mapping](#custom-pipeline-code-for-oidc-group-and-role-mapping) for more infos.
|
||||
Defaults to `false`.
|
||||
|
||||
## NetBox Configuration
|
||||
|
||||
|
@ -71,6 +73,15 @@ The relevant documentation on how to do that can be found here:
|
|||
- Web server setup docs: <https://netboxlabs.com/docs/netbox/en/stable/installation/5-http-server/>
|
||||
- Example base nginx config: <https://github.com/netbox-community/netbox/blob/main/contrib/nginx.conf>
|
||||
|
||||
## Custom Pipeline Code for OIDC Group and Role Mapping
|
||||
|
||||
Setting the option `netbox__custom_pipeline_oidc_group_and_role_mapping` to `true` makes this role ensure custom pipeline code for OIDC group and role mapping is present.
|
||||
Note that this role uses code for NetBox >= 4.0.0.
|
||||
The code is available in `files/custom_pipeline_oidc_group_and_role_mapping.py`, licensed under the CC BY-SA 4.0 license and taken from [this authentik NetBox documentation](https://docs.goauthentik.io/integrations/services/netbox/).
|
||||
The documentation also shows how to use the pipeline code by defining a custom `SOCIAL_AUTH_PIPELINE`, which you also need to do, as the configuration isn't provided by this role.
|
||||
However instead of under `netbox.custom_pipeline.` the functions are available under `netbox.custom_pipeline_oidc_mapping.` with this role.
|
||||
See also [the default settings.py](https://github.com/netbox-community/netbox/blob/main/netbox/netbox/settings.py) for the default `SOCIAL_AUTH_PIPELINE`.
|
||||
|
||||
## Links & Resources
|
||||
|
||||
- The NetBox Git Repo: <https://github.com/netbox-community/netbox>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue