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

Auth0 Client Secrets are being deprecated, but code generator still generates old style configuration #716

Closed
ToddG opened this issue Dec 15, 2023 · 1 comment · Fixed by pulumi/pulumi-auth0#381
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@ToddG
Copy link

ToddG commented Dec 15, 2023

What happened?

  1. Create new auth0 pulumi project
pulumi new
# select auth0-python
# enter in requested information

Here's the full example

11:48 $ p new
Please choose a template (67/221 shown):
 auth0-python                       A minimal Auth0 Python Pulumi program
This command will walk you through creating a new Pulumi project.

Enter a value or leave blank to accept the (default), and press <ENTER>.
Press ^C at any time to quit.

project name (temp):  
 
A project with the name `temp` already exists. Use 'temp' anyway
project description (A minimal Auth0 Python Pulumi program):  
Created project 'temp'

Please enter your desired stack name.
To create a stack in an organization, use the format <org-name>/<stack-name> (e.g. `acmecorp/dev`).
stack name (dev): temp 
Created stack 'temp'

auth0:clientId: The Auth0 client ID:  
auth0:clientSecret: The Auth0 client secret:  
auth0:domain: The Auth0 domain: abc 
...
Your new project is ready to go! 

To perform an initial deployment, run `pulumi up`
  1. pulumi up
11:59 $ p preview
Previewing update (temp)

View in Browser (Ctrl+O): https://app.pulumi.com/ToddG/temp/temp/previews/4fb8f39c-52a9-4f30-805e-b57e4aa702b7

     Type                   Name       Plan       Info
 +   pulumi:pulumi:Stack    temp-temp  create     1 warning
 +   └─ auth0:index:Client  client     create     

Diagnostics:
  pulumi:pulumi:Stack (temp-temp):
    warning: client_secret is deprecated: Reading the client secret through this attribute is deprecated and it will be removed in a future version. Migrate to the `auth0_client_credentials` resource to manage a client's secret instead or use the `auth0_client` data source to read this property.

Outputs:
    client_id    : output<string>
    client_secret: output<string>

Resources:
    + 2 to create

Example

What I'd like is for the code generator to generate the code it recommends we use:

auth0_client_credentials resource
or
auth0_client data source

From warning:

warning: client_secret is deprecated: Reading the client secret through this attribute is deprecated and it will be removed in a future version. Migrate to the `auth0_client_credentials` resource to manage a client's secret instead or use the `auth0_client` data source to read this property.

But I'll settle for any instructions that tell me how to do that. As my preference, or obvious security reasons, is to use Auth0 PrivateJWTKey instead of Client Secrets.

Output of pulumi about

11:59 $ pulumi about
CLI
Version 3.97.0
Go Version go1.21.5
Go Compiler gc

Plugins
NAME VERSION
auth0 2.24.3
python unknown

Host
OS ubuntu
Version 22.04
Arch x86_64

This project is written in python: executable='/home/todd/.pyenv/shims/python3' version='3.10.7'

Current Stack: ToddG/temp/temp

Found no resources associated with temp

Found no pending operations associated with temp

Backend
Name pulumi.com
URL https://app.pulumi.com/ToddG
User ToddG
Organizations ToddG, redzone-co
Token type personal

Dependencies:
NAME VERSION
pip 23.3.1
pulumi-auth0 2.24.3
setuptools 69.0.2
wheel 0.42.0

Pulumi locates its logs in /tmp by default

Additional context

https://pulumi-community.slack.com/archives/C01PF3E1B8V/p1702669699586329

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@ToddG ToddG added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 15, 2023
@iwahbe
Copy link
Member

iwahbe commented Dec 18, 2023

Hi @ToddG. Thanks for pointing this out to us. Since this is a problem with the template, I'm going to move this issue to our https://github.com/pulumi/templates repo.

@iwahbe iwahbe transferred this issue from pulumi/pulumi-auth0 Dec 18, 2023
@iwahbe iwahbe self-assigned this Dec 19, 2023
@iwahbe iwahbe removed the needs-triage Needs attention from the triage team label Dec 19, 2023
iwahbe added a commit to pulumi/pulumi-auth0 that referenced this issue Dec 19, 2023
Configuration options are taken from schema.json

Fixes pulumi/templates#716
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants