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

fix: snowpipe backoff missing for validation error #5504

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shekhar-rudder
Copy link
Member

@shekhar-rudder shekhar-rudder commented Feb 12, 2025

Description

If a Snowpipe destination is created with an invalid private key, the Snowpipe client returns an ERR_VALIDATION_ERROR code. Previously, this was handled in the default case, preventing it from being classified as an Authz error. As a result, neither backoff nor config validation occurred in the Upload function.

This PR fixes the issue by correctly identifying and returning this error as Authz.

  • Added ErrAuthenticationFailed for invalid user name and ErrRoleDoesNotExistOrNotAuthorized for invalid role

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@@ -138,6 +138,8 @@ func (m *Manager) createChannel(
}
m.channelCache.Store(tableName, resp)
return resp, nil
case internalapi.ErrValidationError:
return nil, fmt.Errorf("%w, %w", errAuthz, err)
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically speaking, this is an authentication error and not authorization. But I don't think there is a need for that distinction yet.

@shekhar-rudder shekhar-rudder force-pushed the war-240-snowpipe-config-validation branch from 46d907c to 3b9edee Compare February 12, 2025 16:45
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.

1 participant