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: decrypt provider config in refreshConnections #3485

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

TBonnin
Copy link
Collaborator

@TBonnin TBonnin commented Feb 8, 2025

We were passing the encrypted oauth client secret to refreshOrTestCredentials because unlike the other method in config.service the getStaleConnections function doesn't decrypt the oauth client secret :(

Ideally we should have different types for encrypted/decrypted entities to prevent passing the wrong one

We were passing the encrypted oauth client secret to refreshOrTestCredentials
because unlike the other method in config.service the getStaleConnections
function doesn't decrypt the oauth client secret
@TBonnin TBonnin requested a review from a team February 8, 2025 03:53
@TBonnin TBonnin merged commit 9749608 into master Feb 8, 2025
17 checks passed
@TBonnin TBonnin deleted the tbonnin/fix-cron-refresh-connections branch February 8, 2025 04:00
@@ -65,14 +65,25 @@ export async function exec(): Promise<void> {
}

const { connection, account, environment, integration } = staleConnection;
const decrypted = encryptionManager.decryptConnection(connection);
logger.info(`${cronName} refreshing connection '${connection.connection_id}' for accountId '${account.id}'`);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oups I removed this log. Will fix on Monday

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