Skip to content

Commit

Permalink
feature/op vault aws (#119)
Browse files Browse the repository at this point in the history
* update id of vault in 1password

* Update 1password vault and item ids for aws and lisa

* remove typo

---------

Co-authored-by: Per Lisshamre <[email protected]>
  • Loading branch information
triggerfish-stockholm and lissmeister authored Nov 7, 2024
1 parent 8089023 commit 07dcff6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.20.1 (2024-11-07)
### Fixes
🛠 Fix faulty item id for aws after changing vaults in 1Password.
🛠 Fix faulty item id for lisa after changing vaults in 1Password.

## 2.20.0 (2024-11-06)
### Fixes
🛠 Fix faulty item id after changing vaults in 1Password.
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { checkLisaVersion } from "./lib/versions.js"
import { generateVaultPass } from "./tasks/trellis.js"

export const program = new Command()
export const LISA_VERSION = "2.20.0"
export const LISA_VERSION = "2.20.1"

resetConf()
checkNodeVersion()
Expand Down
2 changes: 1 addition & 1 deletion lib/1password.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function addCredentialsTo1Password() {
const appName = await getAppName()
const vaultPass = getVaultPass()
const { username, password } = store.get("admin")
const sharedVault = "t2wjn2kns7n6ydxusisd4qwhya"
const sharedVault = "ryviwoy5u66roitf5rb2pc6lze"

try {
await exec(
Expand Down
2 changes: 1 addition & 1 deletion lib/vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function getLisaVaultPass() {
try {
writeInfo("Fetching Lisa Vault Pass from 1Password...")
return await exec(
"op item get wa2cahynsfahjlr3yvitewp4wi --fields label=vault_pass",
"op item get z3vqskkf7vjowsqnulf5aw4hf4 --fields label=vault_pass",
).then((res) => res.stdout.trim())
} catch (error) {
return await askForLisaVaultPass()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@triggerfishab/lisa-cli",
"version": "2.20.0",
"version": "2.20.1",
"description": "CLI commands to generate a new project based on Lisa",
"main": "./index.js",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions tasks/services/aws.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ async function getBucketRegion(bucketName) {
async function saveAccessKey(accessKeyId, secretAccessKey, fullProjectName) {
try {
return await exec(
`op item create --category login --title ${fullProjectName} 'username=${accessKeyId}' 'secretAccessKey=${secretAccessKey}' --vault g5rjl6vo44f3fnucye7zonybs4`,
`op item create --category login --title ${fullProjectName} 'username=${accessKeyId}' 'secretAccessKey=${secretAccessKey}' --vault sgqdtx2zolsz4rwq7wjnvkmxhy`,
)
} catch (error) {
writeError(`Failed saving access keys to 1Password. \n ${error}`)
Expand All @@ -407,7 +407,7 @@ async function saveAccessKey(accessKeyId, secretAccessKey, fullProjectName) {
async function getAWSKeys() {
try {
return await exec(
"op item get l2i57yslyjfr5jsieew4imwxgq --fields label='aws.access key id',label='aws.secret access key',label='aws.canonical user id',label='aws.account id'",
"op item get uhfxs25bmpaqk24fay4wz7qsie --fields label='aws.access key id',label='aws.secret access key',label='aws.canonical user id',label='aws.account id'",
).then((res) => res.stdout.trim().split(","))
} catch (error) {
writeError(`Failed accessing 1Password. \n ${error}`)
Expand Down

0 comments on commit 07dcff6

Please sign in to comment.