Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

500 error code for POST /oauth/token #829

Closed
eastandwestwind opened this issue Jul 7, 2022 · 0 comments · Fixed by #830
Closed

500 error code for POST /oauth/token #829

eastandwestwind opened this issue Jul 7, 2022 · 0 comments · Fixed by #830
Assignees
Labels
bug Something isn't working

Comments

@eastandwestwind
Copy link
Contributor

Bug Description

500 error when attempting POST {{host}}/oauth/token:

ValueError: Scopes are required when using the OAUTH_ROOT_CLIENT_ID for POST {{host}}/oauth/token

Cause

POST {{host}}/oauth/token does not pass in needed scopes to fideslib through ClientDetail.get()

Steps to Reproduce

  1. make server on fidesops
  2. use postman to ping POST {{host}}/oauth/token

Expected behavior

200 OK

Additional info

Add a test for root client oauth:

class TestAcquireAccessToken:
    def test_get_access_token_root_client(self, db, url, api_client):
        data = {
            "client_id": config.security.OAUTH_ROOT_CLIENT_ID,
            "client_secret": config.security.OAUTH_ROOT_CLIENT_SECRET,
        }

        response = api_client.post(url, data=data)
        # Fideslib will raise a ValueError: Scopes are required when using the OAUTH_ROOT_CLIENT_ID
@eastandwestwind eastandwestwind added the bug Something isn't working label Jul 7, 2022
@eastandwestwind eastandwestwind self-assigned this Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant