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

Not able to enable PKCE within okta_idp_oidc module #1731

Closed
d02540315 opened this issue Sep 15, 2023 · 2 comments · Fixed by #1878
Closed

Not able to enable PKCE within okta_idp_oidc module #1731

d02540315 opened this issue Sep 15, 2023 · 2 comments · Fixed by #1878
Labels
public-api-missing-attribute The Okta public API is missing documentation on an attribute of an otherwise public resource triaged Triaged into internal Jira

Comments

@d02540315
Copy link

Terraform Version

terraform v1.4.6
okta provider v4.4.2

Affected Resource(s)

  • okta_idp_oidc

Terraform Configuration Files

How to enable PKCE in okta_idp_oidc module?
image

I don't find corresponding attribute in the terraform module (okta_idp_oidc) https://registry.terraform.io/providers/okta/okta/latest/docs/resources/idp_oidc

@monde
Copy link
Collaborator

monde commented Sep 19, 2023

Thanks @d02540315 I can see the boolean in the POST body of /api/v1/idps at protocol.credentials.client.pkce_required so this is a public attribute, see JSON body below. However, looking at our internal openapi spec I can see it's not listed on IdentityProviderCredentialsClient therefore it won't be available in out golang SDK or API docs https://developer.okta.com/docs/api/openapi/okta-management/management/tag/IdentityProvider/#tag/IdentityProvider/operation/createIdentityProvider

I'll open an internal work item on this.

{
  "type": "OIDC",
  "status": "ACTIVE",
  "features": [],
  "name": "Test",
  "protocol": {
    "endpoints": {
      "authorization": {
        "binding": "HTTP-REDIRECT",
        "url": "https://example.com/auth"
      },
      "token": {
        "binding": "HTTP-POST",
        "url": "https://example.com/token"
      },
      "userInfo": null,
      "jwks": {
        "binding": "HTTP-REDIRECT",
        "url": "https://example.com/jwks"
      }
    },
    "scopes": [
      "email",
      "openid",
      "profile"
    ],
    "settings": {
      "nameFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
    },
    "type": "SAML2",
    "algorithms": null,
    "credentials": {
      "client": {
        "pkce_required": true,
        "client_id": "abc123",
        "client_secret": "xyx123"
      }
    },
    "issuer": {
      "url": "test"
    }
  },
  "policy": {
    "accountLink": {
      "action": "DISABLED",
      "filter": null
    },
    "provisioning": {
      "action": "AUTO",
      "conditions": {
        "userOffboarding": {
          "action": "NONE"
        },
        "deprovisioned": {
          "action": "NONE"
        },
        "suspended": {
          "action": "NONE"
        }
      },
      "groups": {
        "action": "NONE"
      }
    },
    "maxClockSkew": 120000,
    "subject": {
      "userNameTemplate": {
        "template": "idpuser.email"
      },
      "matchType": "USERNAME",
      "matchAttribute": "",
      "filter": ""
    }
  },
  "_links": {
    "acs": {
      "hints": {
        "allow": []
      }
    },
    "metadata": {
      "hints": {
        "allow": []
      }
    },
    "users": {
      "hints": {
        "allow": []
      }
    },
    "authorize": {
      "hints": {
        "allow": []
      }
    },
    "clientRedirectUri": {
      "hints": {
        "allow": []
      }
    }
  }
}

@monde monde added public-api-missing-attribute The Okta public API is missing documentation on an attribute of an otherwise public resource triaged Triaged into internal Jira labels Sep 19, 2023
@monde
Copy link
Collaborator

monde commented Sep 19, 2023

Okta internal reference: https://oktainc.atlassian.net/browse/OKTA-649252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
public-api-missing-attribute The Okta public API is missing documentation on an attribute of an otherwise public resource triaged Triaged into internal Jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants