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

1pass plugin improvements #125

Merged
merged 10 commits into from
Aug 17, 2024
Merged

1pass plugin improvements #125

merged 10 commits into from
Aug 17, 2024

Conversation

theoephraim
Copy link
Contributor

improving the 1password plugin, getting ready for real use and content publication.

  • use 1pass js SDK if connecting via service account
  • remove op cli post install hook, rely on system installed version only
  • add explicit opt-in to use system installed cli when token is empty
  • better error handling and messages
  • support using field IDs for id-based resolvers
  • updated docs
  • beginning some related refactoring around resolvers and errors
  • fixed resolver caching to handle non-string values

Copy link

changeset-bot bot commented Aug 16, 2024

🦋 Changeset detected

Latest commit: 621fc82

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@dmno/encrypted-vault-plugin Patch
@dmno/1password-plugin Patch
dmno Patch

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

Copy link

netlify bot commented Aug 16, 2024

Deploy Preview for signup-api canceled.

Name Link
🔨 Latest commit 621fc82
🔍 Latest deploy log https://app.netlify.com/sites/signup-api/deploys/66c1270b5c95ca0008dd1b45

Copy link

netlify bot commented Aug 16, 2024

Deploy Preview for dmno ready!

Name Link
🔨 Latest commit 621fc82
🔍 Latest deploy log https://app.netlify.com/sites/dmno/deploys/66c1270c2747fe0008372f85
😎 Deploy Preview https://deploy-preview-125--dmno.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@theoephraim theoephraim force-pushed the 1pass-improvements branch 2 times, most recently from 9c18dd3 to b2f47a8 Compare August 16, 2024 07:42
Copy link

pkg-pr-new bot commented Aug 16, 2024

commit: 621fc82

pnpm add https://pkg.pr.new/@dmno/encrypted-vault-plugin@125
pnpm add https://pkg.pr.new/@dmno/1password-plugin@125
pnpm add https://pkg.pr.new/dmno@125

Open in Stackblitz

packages/core/src/config-engine/resolvers/resolvers.ts Outdated Show resolved Hide resolved

</Steps>

This service account token will now serve as your "secret-zero" - which grants access to the rest of your sensitive config stored in 1password. It must be set locally and in deployed environments, and as it is sensitive, we must pass in the value as an _override_ rather than storing it within the config. Locally this usually means storing it in your `.env.local` and on a deployed environment you'll usually set it within some kind of UI, wherever you would normally pass in secrets.
This service account token will now serve as your "secret-zero" - which grants access to the rest of your sensitive config stored in 1Password. It must be set locally (unless relying on cli-based auth) and in deployed environments. It is sensitive and so we must pass in the value as an _override_ rather than storing it within the config. Locally this usually means storing it in your `.env.local` and on a deployed environment you'll usually set it within some kind of UI, wherever you would normally pass in secrets.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This service account token will now serve as your "secret-zero" - which grants access to the rest of your sensitive config stored in 1Password. It must be set locally (unless relying on cli-based auth) and in deployed environments. It is sensitive and so we must pass in the value as an _override_ rather than storing it within the config. Locally this usually means storing it in your `.env.local` and on a deployed environment you'll usually set it within some kind of UI, wherever you would normally pass in secrets.
This service account token will now serve as your _secret-zero_ - which grants access to the rest of your sensitive config stored in 1Password. It must be set locally (unless relying on CLI-based auth) and in deployed environments. It is sensitive and so we must pass in the value as an _override_ rather than storing it within the config. Locally this usually means storing it in your `.env.local` and on a deployed environment you'll usually set it within some kind of UI, wherever you would normally pass in secrets.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just explicitly say it will need to be set as an env var in the platform on which it's deployed.

});
```

Of course you could point to a `configPath` in your schema and toggle the opt-in based on some other logic if you'd like.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd skip this unless we're going to explain it.

packages/core/src/config-engine/plugins.ts Outdated Show resolved Hide resolved
theoephraim and others added 2 commits August 16, 2024 12:27
Co-authored-by: Phil Miller <phil@dmno.dev>
@theoephraim theoephraim marked this pull request as ready for review August 17, 2024 22:44
@theoephraim theoephraim merged commit abdaf0c into main Aug 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants