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

Assigning a SAML app preconfiguredApp settings to enable the Provisioning Integration API token setting (Snowflake) #748

Closed
sean-stage opened this issue Oct 23, 2024 · 2 comments
Labels
kind/question Questions about existing features

Comments

@sean-stage
Copy link

I have had a search around the Snowflake and Okta pulumi modules for information on how this might be configured but haven't found anything yet, so I'm hoping a quick post here might help.

I use the snowflake Okta app catalog 'preconfiguredApp' to create a SAML application in Okta with the pulumi Okta module. This mirrors the previous manually setup method I use to configure multiple Okta applications for users to sign into various Snowflake accounts.

When having previously set these up manually in the Okta admin console, using the 'snowflake' app catalog template, The "Provisioning" tab of the application has a section labelled "Integration" where you are able to provide a SCIM token (generated in Snowflake from the security integration you create there).

Enabling this and providing the token allows Okta to be able to create/update users assigned to the Snowflake okta application in Snowflake itself. (The create/updates are delegated across to the Snowflake security integration automatically).

I can't figure out how to configure this Okta Snowflake App setting with the Pulumi okta+snowflake modules. (I have already setup the Snowflake ScimIntegration and have got pulumi to generate the SCIM access token successfully) so the last part is just setting up the Provisioning Integration.

What I have:

Snowflake creation of the SCIM integration:

new snowflake.ScimIntegration(sfkAccountName + "_okta_provisioning_integration", {
    name: scimIntegrationName,
    enabled: true,
    scimClient: "OKTA",
    syncPassword: "false",
    runAsRole: oktaProvisionerRoleName,
}, { provider: provider });

const genTokenSql = `select system$generate_scim_access_token('${scimIntegrationName}');`;
const scimToken = new snowflake.UnsafeExecute(sfkAccountName + "_generate_scim_access_token_" + scimTokenSeed, {
    execute: genTokenSql,
    revert: genTokenSql,
    query: genTokenSql,
}, { provider: provider });

(I would assume the above scimToken value will be passed through to the Okta Application for the Provisioning integration).

Okta creation of the 'snowflake' app catalog SAML app:

const samlApp = new okta.app.Saml(sfkAccountName + "_okta_snowflake_app", {
    preconfiguredApp: "snowflake",
    label: `Snowflake (${project}-${environment})`,
    appSettingsJson: JSON.stringify({
        subDomain: sfkAccountWithOrgName.toLowerCase(),
    }),
}, { provider: oktaProvider });

So with the above two done, I now need to know how to enable the Okta Snowflake app's Provisioning integration. This is what the area looks like when configured 'by hand' in the Okta Admin console:

Image

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Oct 23, 2024
@VenelinMartinov
Copy link
Contributor

Hey @sean-stage. Thanks for the question. Unfortunately, this is probably not the best place to ask this as we are not necessarily experts with Okta and Snowflake.

The way a lot of pulumi providers work and Snowflake and Okta specifically is that they wrap the Terraform provider maintained by Snowflake and Okta, respectively. They are probably better suited to answer your question as they understand their products much better.

Once you have the relevant terraform resources to configure the snowflake app, you should be able to translate into pulumi either by mapping the resource name yourself (they are named quite similarly) or using pulumi AI for example: https://www.pulumi.com/ai

In case the terraform providers are not able to configure the snowflake app, then pulumi would not able to either as we support the same set of resources, so we'd need to wait for support upstream. Hope this helps! Let me know if you have any other questions.

@VenelinMartinov VenelinMartinov added kind/question Questions about existing features and removed needs-triage Needs attention from the triage team labels Oct 28, 2024
@sean-stage
Copy link
Author

Thanks @VenelinMartinov - that makes sense. I've had a look already through the upstream terraform provider for okta but couldn't see what I needed - but its clear now that I should ask this question there, so will do so. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions about existing features
Projects
None yet
Development

No branches or pull requests

3 participants