binxio/cfn-secret-provider

custom::secret resource password policy

Closed this issue · 8 comments

If i wanted to generate a secret that is according to a password policy with

  1. atleast one lower case
  2. atleast one upper case
  3. atleast one of the special chars
  4. atleast one number

how do i do it ? currently there is only the "alphabet" property on resource.

if there were alphabet1, alphabet2, alphabet3 etc available then i could provide different alphabet sets. is there some other workaround ?

Hi @ragogitpub , I have added the property Required which allows you to specify the required alphabets

      Alphabet: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_@#!
      Required:
        - Alphabet: abcdefghijklmnopqrstuvwxyz
          Count: 1
        - Alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ
          Count: 1
        - Alphabet: _@#!
          Count: 1

please use v1.1.1 of the provider

@ragogitpub are you happy with it?

@mvanholsteijn i cant seem to get any special chars to show up in the secret.

      Alphabet: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=[]{}|'
      Required:
        - Alphabet: 'abcdefghijklmnopqrstuvwxyz'
          Count: 1
        - Alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
          Count: 1
        - Alphabet: '0123456789'
          Count: 1
        - Alphabet: '!@#$%^&*()_-=[]{}|'
          Count: 1

am i doing something wrong ?

Did you install version 1.1.1? The funtionality was not available before.
https://binxio-public-eu-central-1.s3.amazonaws.com/lambdas/cfn-secret-provider-1.1.1.zip

i tried it with

aws s3 cp s3://binxio-public-us-east-1/lambdas/cfn-secret-provider-1.1.1.zip .

let me try the version from eu-central-1 in case its different

Sorry @mvanholsteijn i had a stupid bug in my code. It works great. I appreciate the quick turnaround. Cheers and thanks, Mark.