Skip to content

Commit

Permalink
fix!: input base64 string for password
Browse files Browse the repository at this point in the history
BREAKING CHANGES: redisPassword now takes a base64 encoded value instead
of a plaintext value
  • Loading branch information
Hunter Thompson committed Dec 13, 2021
1 parent dd9e356 commit ea264b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .projenrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { ConstructLibraryCdk8s } = require('projen');

const project = new ConstructLibraryCdk8s({
author: 'Hunter Thompson',
authorAddress: 'aatman@auroville.org.in',
Expand Down
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -31768,7 +31768,7 @@ public readonly redisPassword: string;

- *Type:* `string`

The redis password Has to be plaintext, a way you can securely get a password is by using AWS Secrets Manager.
The redis password Has to be base64 encoded, a way you can securely get a password is by using AWS Secrets Manager.

---

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface RedisOptions {
readonly volumeFsType?: string;
/**
* The redis password
* Has to be plaintext, a way you can securely get a password is by using AWS Secrets Manager
* Has to be base64 encoded, a way you can securely get a password is by using AWS Secrets Manager
*/
readonly redisPassword: string;
/**
Expand Down Expand Up @@ -103,7 +103,7 @@ export class Redis extends Construct {
},
type: 'Opaque',
data: {
'redis-password': Buffer.from(opts.redisPassword).toString('base64'),
'redis-password': opts.redisPassword,
},
});

Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/hello.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea264b8

Please sign in to comment.