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

[SNOW-89] Update authentication policy for service accounts #146

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

philerooski
Copy link
Collaborator

How a user is allowed to authenticate is regulated by authentication policies. This PR alters our existing authentication policy for service accounts by additionally allowing key-pair authentication. I also correct a typo in the integrations.sql file.

@philerooski philerooski requested a review from a team as a code owner February 17, 2025 17:44
Copy link

ALTER ACCOUNT SET CORTEX_ENABLED_CROSS_REGION = 'ANY_REGION';

ALTER AUTHENTICATION POLICY service_account_authentication_policy
AUTHENTICATION_METHODS = ('PASSWORD', 'KEYPAIR');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is surprising. I thought the whole premise around service type accounts was that it only allowed keypair auth...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomasyu888 That's correct. If the user type is "SERVICE" then you can only authenticate via key-pair. That doesn't mean that user gets a free pass from the existing authentication policies to authenticate using key-pair.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This alteration makes it so that we can access our service account via a password too, is that correct? Are we doing key-pair or password when GitHub logs into these accounts for CI/CD?

Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 LGTM!

@philerooski
Copy link
Collaborator Author

@thomasyu888 @jaymedina

I'm modifying a preexisting authentication policy, so "PASSWORD" is included for backward compatibility. We can remove it once we officially remove support for those other service accounts/users (including thomasyu888, the service user which currently executes our CI pipeline).

ADMIN_SERVICE and DEVELOPER_SERVICE will only ever authenticate via key-pair authentication (they must, since they were created specifically as "SERVICE" type accounts).

@philerooski philerooski merged commit 68a3618 into main Feb 17, 2025
3 checks passed
@philerooski philerooski deleted the snow-89-update-auth-policy branch February 17, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants