[go: up one dir, main page]

Page MenuHomePhabricator

Unable to log in to Netbox
Open, MediumPublic

Description

For some reason I'm not able to log in to Netbox, instead I get a (for some reason unstyled) "Application Not Authorized to Use CAS" error page:

image.png (353×1 px, 35 KB)

The CAS logs are not much more helpful, either:

2024-08-30 16:45:19,972 WARN [org.apereo.cas.services.RegisteredServiceAccessStrategyUtils] - <Cannot grant access to service [netbox_oidc]; it is not authorized for use by [Majavah].>
2024-08-30 16:45:19,974 ERROR [org.apereo.cas.support.oauth.web.endpoints.OAuth20AuthorizeEndpointController] - <Cannot grant service access netbox_oidc to Majavah
	RegisteredServiceAccessStrategyUtils.java:ensurePrincipalAccessIsAllowedForService:149
	RegisteredServiceAccessStrategyAuditableEnforcer.java:byServiceAndRegisteredServiceAndPrincipal:148
	RegisteredServiceAccessStrategyAuditableEnforcer.java:lambda$execute$2:190
>

The main page at https://idp.wikimedia.org/login does list cn=nda,ou=groups,dc=wikimedia,dc=org in memberOf so I should have the right permissions.

Event Timeline

SLyngshede-WMF triaged this task as Medium priority.

Netbox is limited to the groups "ops" and "wmf", seems a little weird that CAS would error out like that though.

Netbox is limited to the groups "ops" and "wmf", seems a little weird that CAS would error out like that though.

I was looking at T302870 there which seems to suggest nda did indeed previously have access? Can/should we therefore add the nda group to it? Or do we understand properly what changed since the earlier task was closed?

do we understand properly what changed since the earlier task was closed?

Maybe this?

https://gerrit.wikimedia.org/r/c/operations/puppet/+/932231

do we understand properly what changed since the earlier task was closed?

Maybe this?

https://gerrit.wikimedia.org/r/c/operations/puppet/+/932231

Taavi re-added the group in bb989a1c77e3cd34b844dd19b5f352efd043716a. I'm not sure what's wrong either.

Taavi re-added the group in bb989a1c77e3cd34b844dd19b5f352efd043716a. I'm not sure what's wrong either.

Actually you're right - it's ops that isn't there now, but both 'wmf' and 'nda' is in the latest production branch.

Netbox is configured to

SOCIAL_AUTH_ALLOW_GROUPS = ['ops', 'wmf']

so we might want to add nda there. I just think it's a little strange that it would trigger an error on CAS and not Netbox

Change #1070563 had a related patch set uploaded (by Slyngshede; author: Slyngshede):

[operations/puppet@production] C:netbox: Allow NDA group to access Netbox.

https://gerrit.wikimedia.org/r/1070563