Skip to content

Keyword preservation fails for client grants #855

@DevinRiley

Description

@DevinRiley

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When I dump config to my tenant.yml file, it doesn't preserve keywords for my client grants. This appears to be related to this PR based on the caveat made in that PR description and my own testing between versions 7.18.0 and 7.19.0

Before:

clientGrants:
  - client_id: API Explorer Application
    audience: https://##TENANT##.us.auth0.com/api/v2/
    scope: '@@API_EXPLORER_APPLICATION_CLIENT_GRANT_SCOPES@@'
  - client_id: M2M Application 1
    audience: '##API_IDENTIFIER##'
    scope: []
  - client_id: M2M Application 2
    audience: https://##TENANT##.us.auth0.com/api/v2/
    scope:
      - create:users

Run a0deploy dump -c=config-dev.json --format=yaml --output_folder=resources

After:

clientGrants:
  - client_id: API Explorer Application
    audience: https://redacted.us.auth0.com/api/v2/
    scope:
      - read:users
      - update:users
      - delete:users
      - create:users
  - client_id: M2M Application 1
    audience: http://localhost:3000
    scope: []
  - client_id: M2M Application 2
    audience: https://redacted.us.auth0.com/api/v2/
    scope:
      - create:users

This is a problem for us because we deploy this tenant yaml to different environments and need the keyword replacements to work for each environment.

Expectation

I'd expect keywords to be preserved in the tenant.yml file.

Reproduction

I have only encountered this on my actual tenant, but I believe you could reproduce by settings up multiple client grants that use the same client_id

Deploy CLI version

7.19.0

Node version

14.19.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions