Skip to content

website/integrations: netbox: add missing scope configuration#9491

Merged
rissson merged 3 commits intogoauthentik:mainfrom
Eising:patch-1
May 21, 2024
Merged

website/integrations: netbox: add missing scope configuration#9491
rissson merged 3 commits intogoauthentik:mainfrom
Eising:patch-1

Conversation

@Eising
Copy link
Contributor

@Eising Eising commented Apr 28, 2024

While trying the proposed documentation, I found that the group mapping did not work.

After troubleshooting for a while, it seems that Netbox does not seem to request the roles scope at all, so the Scope mapping is actually never used (or at least that is how I understand the problem).

Changing the scope of the example provided to profile instead makes it work perfectly.

This PR contains just this change in the documentation.

Netbox does not seem to request the `roles` profile, so this scope is never sent. However, changing it to `profile` makes the integration work perfectly.

Signed-off-by: Allan Eising <allan.eising@gmail.com>
@Eising Eising requested a review from a team as a code owner April 28, 2024 09:31
@netlify
Copy link

netlify bot commented Apr 28, 2024

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit 628bf88
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/6646589756f9aa0008c072eb

@netlify
Copy link

netlify bot commented Apr 28, 2024

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 628bf88
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/6646589724ec3d0008692d4a
😎 Deploy Preview https://deploy-preview-9491--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@rissson rissson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to set SOCIAL_AUTH_OIDC_SCOPE = ["openid", "profile", "email", "roles"] in the Netbox configuration for the roles scope to be requested. That configuration is indeed missing from the documentation. I'd rather we add that than use a well-known scope that doesn't fit the use case.

@rissson rissson changed the title Change scope name to profile website/integrations: netbox: add missing scope configuration Apr 29, 2024
@codecov
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.39%. Comparing base (f282095) to head (628bf88).
Report is 24 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9491   +/-   ##
=======================================
  Coverage   92.38%   92.39%           
=======================================
  Files         704      704           
  Lines       34403    34403           
=======================================
+ Hits        31784    31785    +1     
+ Misses       2619     2618    -1     
Flag Coverage Δ
e2e 49.66% <ø> (-0.01%) ⬇️
integration 25.36% <ø> (ø)
unit 89.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tanberry
Copy link
Contributor

Hi @Eising did you want to make the change that @rissson suggested? That would be great if so, otherwise we can do, just let us know. Thanks for pointing out this discrepency in the docs!

@tanberry tanberry added the status/awaiting-contributor Awaiting a response from the contributor label May 15, 2024
@Eising
Copy link
Contributor Author

Eising commented May 16, 2024

Hi @Eising did you want to make the change that @rissson suggested? That would be great if so, otherwise we can do, just let us know. Thanks for pointing out this discrepency in the docs!

I will do so momentarily. Thanks for reminding me!

@Eising
Copy link
Contributor Author

Eising commented May 16, 2024

Updated with the suggested fix.

@rissson rissson enabled auto-merge (squash) May 21, 2024 10:20
@rissson rissson merged commit 6ffef87 into goauthentik:main May 21, 2024
kensternberg-authentik added a commit that referenced this pull request May 24, 2024
* main: (36 commits)
  ci: use container registry for container build cache (#9809)
  core: bump lxml from 5.2.1 to 5.2.2 (#9717)
  web: bump mermaid from 10.9.0 to 10.9.1 in /web (#9734)
  core: bump scim2-filter-parser from 0.5.0 to 0.5.1 (#9730)
  web: bump core-js from 3.37.0 to 3.37.1 in /web (#9733)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#9729)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN (#9802)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans (#9803)
  core: bump sentry-sdk from 2.2.0 to 2.2.1 (#9807)
  web: bump the storybook group in /web with 7 updates (#9804)
  web: bump glob from 10.3.15 to 10.3.16 in /web (#9805)
  root: docker-compose: remove version top level element (#9631)
  core, web: update translations (#9790)
  web: bump API Client version (#9801)
  web/admin: rework initial wizard pages and add grid layout (#9668)
  website/integrations: discord: fix typo (#9800)
  website/integration/netbox: fix group custom pipeline example (#9738)
  root: add primary-replica db router (#9479)
  website/integrations: add three more policy-expressions to discord-docs (#5760)
  website/integrations: netbox: add missing scope configuration (#9491)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/awaiting-contributor Awaiting a response from the contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants