-
Notifications
You must be signed in to change notification settings - Fork 72
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
POC - Seed Secrets #2361
base: main
Are you sure you want to change the base?
POC - Seed Secrets #2361
Conversation
🦋 Changeset detectedLatest commit: cbaf469 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
//not using this anymore | ||
//stole this from ../packages/cli/src/backend-identifier/local_namespace_resolver.ts for the POC |
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.
these will probably go to cli-core
.
packages/backend-seed/API.md
Outdated
// @public (undocumented) | ||
export const GetSeedSecret: (secretName: string) => Promise<string>; |
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.
I'd just call it getSecret
.
Other option we could consider is
type SeedSecretClient {
getSecret: () => Promise<string>;
}
// factory returns implementation
getSeedSecretClient = () => SeedSecretClient
We should think about packaging of this because APIs to deal with secrets will grow over time.
We'll also have AuthSeedClient
or so or set of auth related APIs. it would be good to group secrets and auth.
An alternative would be to develop namespaces:
@aws-amplify/backend-seed/secret
and @aws-amplify/backend-seed/auth
.
We should capture these alternatives in API review.
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.
I initially called it getSecret
, but I got some errors since it conflicted with getSecret
from the backend-secret
package -- I'll probably experiment with it again
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.
This might be helpful syntax to resolve that problem
import { authOutputSchema as authOutputSchemaV1 } from './v1.js'; |
or import * as backendSecret from 'backend-secret'
and then backendSecret.getSecret
.
Problem
Issue number, if available:
Changes
Corresponding docs PR, if applicable:
Validation
Checklist
run-e2e
label set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.