-
Notifications
You must be signed in to change notification settings - Fork 247
feat: Add signer registry URIs for GCP and Foundry keystores #1364
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| import type { Logger } from 'pino'; | ||
| import { GithubRegistry } from '../registry/GithubRegistry.js'; | ||
| import { GCPSignerRegistry, parseGCPUri } from '../registry/GCPSignerRegistry.js'; | ||
| import { | ||
| FoundryKeystoreRegistry, | ||
| parseFoundryKeystoreUri, | ||
| } from '../registry/FoundryKeystoreRegistry.js'; | ||
|
Comment on lines
+3
to
+7
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Handle invalid gcp:// or foundry:// URIs with scheme-specific errors. 🛠️ Suggested fix-import { GCPSignerRegistry, parseGCPUri } from '../registry/GCPSignerRegistry.js';
+import { GCPSignerRegistry } from '../registry/GCPSignerRegistry.js';
import {
FoundryKeystoreRegistry,
- parseFoundryKeystoreUri,
} from '../registry/FoundryKeystoreRegistry.js';
@@
- // Check for GCP signer registry (gcp://project/secret-name)
- if (parseGCPUri(uri)) {
+ // Check for GCP signer registry (gcp://project/secret-name)
+ if (uri.startsWith('gcp://')) {
return new GCPSignerRegistry({
uri,
logger: childLogger,
});
}
// Check for Foundry keystore registry (foundry://accountName or foundry:///path/accountName)
- if (parseFoundryKeystoreUri(uri)) {
+ if (uri.startsWith('foundry://')) {
return new FoundryKeystoreRegistry({
uri,
logger: childLogger,
});
}Also applies to: 83-97 🤖 Prompt for AI Agents |
||
| import { FileSystemRegistry } from './FileSystemRegistry.js'; | ||
| import { IRegistry } from '../registry/IRegistry.js'; | ||
| import { PROXY_DEPLOYED_URL } from '../consts.js'; | ||
|
|
@@ -74,6 +79,23 @@ export function getRegistry({ | |
| .filter((uri) => !!uri) | ||
| .map((uri, index) => { | ||
| const childLogger = registryLogger?.child({ uri, index }); | ||
|
|
||
| // Check for GCP signer registry (gcp://project/secret-name) | ||
| if (parseGCPUri(uri)) { | ||
| return new GCPSignerRegistry({ | ||
| uri, | ||
| logger: childLogger, | ||
| }); | ||
| } | ||
|
|
||
| // Check for Foundry keystore registry (foundry://accountName or foundry:///path/accountName) | ||
| if (parseFoundryKeystoreUri(uri)) { | ||
| return new FoundryKeystoreRegistry({ | ||
| uri, | ||
| logger: childLogger, | ||
| }); | ||
| } | ||
|
|
||
| if (isProtocolUrl(uri, ['https:']) && uri.includes('github')) { | ||
| return new GithubRegistry({ | ||
| uri, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix lint + make override order deterministic.
ESLint flags
mergedConfigas never reassigned, and file order currently depends on filesystem traversal. Sorting makes overrides predictable.🛠️ Suggested tweak
🧰 Tools
🪛 ESLint
[error] 171-171: 'mergedConfig' is never reassigned. Use 'const' instead.
(prefer-const)
🪛 GitHub Check: lint
[failure] 171-171:
'mergedConfig' is never reassigned. Use 'const' instead
🤖 Prompt for AI Agents