Skip to content

Commit

Permalink
Merge pull request #105 from danklynn/main
Browse files Browse the repository at this point in the history
Replace internal table secret on conflict
  • Loading branch information
samansmink authored Feb 18, 2025
2 parents 80c1211 + 2c63915 commit 906e91e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/storage/irc_table_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ TableFunction ICTableEntry::GetScanFunction(ClientContext &context, unique_ptr<F
}

auto &secret_manager = SecretManager::Get(context);

// Get Credentials from IRC API
auto table_credentials = IRCAPI::GetTableCredentials(
ic_catalog.internal_name, table_data->schema_name, table_data->name, ic_catalog.credentials);
// First check if table credentials are set (possible the IC catalog does not return credentials)
if (!table_credentials.key_id.empty()) {
// Inject secret into secret manager scoped to this path
CreateSecretInfo info(OnCreateConflict::ERROR_ON_CONFLICT, SecretPersistType::TEMPORARY);
CreateSecretInfo info(OnCreateConflict::REPLACE_ON_CONFLICT, SecretPersistType::TEMPORARY);
info.name = "__internal_ic_" + table_data->table_id;
info.type = "s3";
info.provider = "config";
Expand Down

0 comments on commit 906e91e

Please sign in to comment.