Skip to content

attackProtection Directory Handler Broken - parse() does not include files.botDetection #1314

@bt-chaos322

Description

@bt-chaos322

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 install version 18.28.0 of auth0-deploy-cli and export my configs using the Directory stratey to my local environment (which does not yet have bot-detection.json), bot-detection.json is not downloaded as expected. Furthermore, when I manually add the file and deploy with version 18.28.0, my changes are not acknowledged on the web console.

When I downgrade to 18.20.1, everything works as expected.

It looks like the culprit may be attackProtection.ts::parse() starting here. There is not code block to handle files.botDetection.

Expectation

  1. When I make changes to Bot Detection in the web console and then export my configs, I expect to see bot-detection.json in the results and for that file to have the config changes I just made in the web console
  2. When I make changes to my local copy of bot-detection.json and I deploy my configs, I expect the changes I just made to the local file to be reflected in the web console.

Reproduction

Scenario: File doesn't exist and is not downloaded after export

  1. Start with a repo that uses the Directory deployment strategy
  2. Ensure that you do not yet have a bot-detection.json in the attack-protection directory
  3. Ensure your exporter is running version 8.28.0 of auth0-deploy-cli
  4. Make changes to your Bot Detection config in the web console
  5. Export your configs from the tenant to your local
  6. See that you still do not have bot-detection.json in the attack-protection directory

Scenario: File exists and has changes, changes not reflected on web console after deploy

  1. Start with a repo that uses the Directory deployment strategy
  2. Ensure that you do have a bot-detection.json in the attack-protection directory
  3. Ensure your deploy script is running version 8.28.0 of auth0-deploy-cli
  4. Make changes to your Bot Detection config in the local bot-detection.json file
  5. Deploy your configs to the tenant
  6. See that your freshly deployed configs are not represented in the web console

Deploy CLI version

8.28.0

Node version

10.9.2

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