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

windowslive social connection are not supported #62

Closed
roblframpton opened this issue Feb 16, 2021 · 2 comments
Closed

windowslive social connection are not supported #62

roblframpton opened this issue Feb 16, 2021 · 2 comments
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@roblframpton
Copy link

roblframpton commented Feb 16, 2021

I have created a Microsoft social connection using the Connection resource with the windowslive strategy. Every time I run pulumi up this resource thinks it needs updating, even when nothing has changed.

Update: actually, they are not supported at all due to a lack of support upstream, see my edits below

Expected behavior

No changes should show when running pulumi up if the provider options did not change.

Current behavior

Changes show when running pulumi up, even though the provider options did not change:

Previewing update (stack)

View Live: [xxx]

     Type                       Name                    Plan       Info
     pulumi:pulumi:Stack        my-stack             
 ~   ├─ auth0:index:Connection  google-connection       update     [diff: ~options]
 ~   └─ auth0:index:Connection  microsoft-connection    update     [diff: ~options]
 
Resources:
    ~ 2 to update
    42 unchanged

Closer inspection shows that the provider seems to be removing the fields from the options parameter, which is why it thinks it is different:

  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:xxx]
    ~ auth0:index/connection:Connection: (update)
        [id=con_SqkaPc0DPOg20LJf]
        [urn=urn:xxx:auth0:index/connection:Connection::microsoft-connection]
        [provider=urn:xxx::pulumi:providers:auth0::default_1_8_0::d62be9da-0c59-48a0-9a20-c11ab089fc6a]
      ~ options: {
          + clientId       : "my-client-id"
          + clientSecret: "[secret]"
        }

I had a similar problem with the Google connection, where it kept adding scopes, which that was fixable by adding the same scopes myself. But how can I work around it if it's removing fields? I need to provide the client credentials somehow.

Steps to reproduce

Create a resource such as:

    const microsoftConnection = new auth0.Connection("microsoft-connection", {
      strategy: "windowslive",
      displayName: "Microsoft",
      enabledClients: [websiteClient.clientId],
      name: "microsoft",
      options: {
        appId: config.require("microsoftAuthClientId"),
        clientSecret: config.requireSecret("microsoftAuthClientSecret")
      }
    })

It happens with fixed strings as well as config items.

Context (Environment)

pulumi version: v2.20.0
@pulumi/auth0: "^1.8.0"

UPDATE: I then realised that the resulting social provider has a warning triangle saying that it is using Auth0's keys, so clearly it is removing my credentials entirely, which is consistent with the issue. So the question is - what parameters should I use? If I create a connection manually and inspect it via the management API, it clearly shows that the clientId and clientSecret fields are set:

[
  {
    "id": "con_EeB9n3MXmwJQH7QB",
    "options": {
      "scope": [ "https://graph.microsoft.com/User.Read" ],
      "client_id": "my client id",
      "client_secret": "my secret",
      ...
    },
    "strategy": "windowslive",
    "name": "windowslive",
    "is_domain_connection": false,
    "realms": [
      "windowslive"
    ],
    "enabled_clients": [ "my client" ]
  }
]

So this still appears to be a bug. The clientId and clientSecret are getting thrown away when I create the connection.

UPDATE 2: I appear to have found the source of the problem, which is a lack of support upstream. Sorry for the noise on this repo, I guess it relies on a suitable fix in the Terraform provider before this will work.

@roblframpton roblframpton changed the title windowslive social connection always needs updating even when there are no changes windowslive social connection are not supported Feb 17, 2021
@yvovandoorn
Copy link

This should be addressed now with the latest release.

@mikhailshilkov mikhailshilkov added kind/enhancement Improvements or new features resolution/fixed This issue was fixed labels Aug 1, 2023
@mikhailshilkov
Copy link
Member

This issue is very old. I'll go ahead and close it as resolved based on the comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants