Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change in Grants Configuration File Name in Latest Version Upgrade #802

Open
6 tasks done
satokaito opened this issue Jun 20, 2023 · 2 comments
Open
6 tasks done
Labels

Comments

@satokaito
Copy link

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

The changes from #793 have been included since version 7.17.3.

Due to this update, the name of the configuration file saved under /grants has changed when exported with the "AUTH0_PRESERVE_KEYWORDS": true setting.
The file name seems to have been inappropriately transformed by preserveKeywords.

Specifically, it is as follows:

Previously, it was
/grants/{client_id}-Auth0 Management API.json

Now, it is
/grants/{client_id}-https---##AUTH0_DOMAIN##-api-v2-.json

It appears that {client_id}-{audience}.json has been converted into a string by preserveKeywords.
(And this issue continues to be reproduced in the latest version, 7.17.5.)

During import, it appears that /grants/client_name-Auth0 Management API.json is still being referenced.

Expectation

Looking at the tests written in https://github.com/auth0/auth0-deploy-cli/blob/v7.17.5/test/context/directory/clientGrants.test.js, it doesn't seem like the audience's URL becoming the file name is an expected behavior.

Therefore, I perceive that the expected behavior should be exporting the file name in the same format as before, /grants/client_name-Auth0 Management API.json.

Reproduction

  1. Set the AUTH0_PRESERVE_KEYWORDS option to true.
  2. Execute a0deploy export command.

Deploy CLI version

7.17.5

Node version

16.13.1

@satokaito satokaito added the bug label Jun 20, 2023
@willvedd
Copy link
Contributor

willvedd commented Jul 6, 2023

@satokaito Thanks for opening this issue. To be clear, is the issue here the file naming? As in, you're expecting a different filename without the keyword replacement marker or is there a behavioral change that impedes your ability to import?

In normal cases here, you'd expect the name of the client to be in the filename instead of the audience. At first glance it is very possible that the code that pertains to generating the name does not consider replaced keyword values and only the markers. I will need to do further investigation to confirm this theory.

@satokaito
Copy link
Author

@willvedd
Thank you for getting back to me.

Firstly, I want to say we really appreciate auth0-deploy-cli, which has been a tremendous help for our daily operations.

To clarify on the issue at hand, it indeed revolves around the file naming. I'd like to add that there have been no behavioral changes that impede the importing process.

In the past, prior to the version upgrade, the client's name was included in the file name. I believe that was the most suitable behavior.

Thank you for your continued support and for further investigating this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants