Graylog2 / Graylog2/graylog2-server
Malformed request when calling` /team-sync/test/backend` from UI
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
Fix a 500 error and server log exception when calling` /team-sync/test/backend` from `graylog2-web-interface/src/domainActions/authentication/AuthenticationDomain.ts`
## Expected Behavior
We don't want to see exceptions, unless there is a real problem.
## Current Behavior
> POST http://localhost:8080/api/plugins/org.graylog.plugins.security/team-sync/test/backend
>
> {"auth_service_backend_id":"6617b962410e6440db452ee5","auth_service_backend_configuration":{"title":"oidc","description":"oidc","default_roles":["65b7ba0ec5bef8948e2dc6ac"],"config":{"type":"oidc","base_url":"https://dev-320356.okta.com/","claims":{},"callback_url":"http://localhost:8080/authorization-code/callback","client_id":"0oa7dj51qk7pcWvEI357","token_verifier_connect_timeout":10,"client_secret":{"keep_value":true}}},"team_sync_backend_configuration":{"auth_service_backend_id":"6617b962410e6440db452ee5","selection_type":"all","selection":[],"default_roles":["65b7ba0ec5bef8948e2dc6ac"],"config":{"type":"okta","okta_api_token":{"set_value":""}}}}
The problem is the config type `okta`. In Mongo (below), it is stored as type `oidc`.
> {
> "_id" : ObjectId("6617b962410e6440db452eeb"),
> "auth_service_backend_id" : "6617b962410e6440db452ee5",
> "selection_type" : "all",
> "selection" : [],
> "default_roles" : [],
> "config" : {
> "type" : "oidc",
> "groups_claim" : null
> }
> }
>
## Steps to Reproduce (for bugs)
1. Enable network request view in the browser with F12.
2. Click edit on the list entry for an OIDC auth backend.
3. Note a 500 failed request, due to the `team-sync/test/backend` request.
4. You should also see an exception in the server log.
## Context
Does not appear to block anything. But should be cleaned up so as not to be a red herring investigating future auth issues.
## Your Environment
* Graylog Version: 6.1
Contributor guide
Assessment
This issue has not been assessed yet.