Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Marking passwords field of aws_elasticache_user as sensitive #149

Conversation

sergenyalcin
Copy link
Collaborator

@sergenyalcin sergenyalcin commented Jan 11, 2022

Description of your changes

Depends on crossplane/terrajet#100

This PR depends on the following one -> crossplane/terrajet#197
Until merge the dependent PR, a temporary replace command was added to go.mod:

https://github.com/sergenyalcin/provider-jet-aws/blob/ae8fb3a002c0e24f868d0d608fa365ef42d6da7e/go.mod#L26

This PR marks the passwords field of aws_elasticache_user as sensitive. Now, this field is not sensitive and the passwords are put to the spec directly. Because for []string and []*string types, there is not support as sensitive fields. The dependent PR will provide this support. After merging the dependent PR in terrajet, this PR can be merged.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

  • Generation of the resource was successfully completed. The PasswordsSecretRef field was generated as
    *[]v1.SecretKeySelector

  • I created the following manifest:

apiVersion: elasticache.aws.jet.crossplane.io/v1alpha1
kind: User
metadata:
  name: sample-user
spec:
  forProvider:
    userName: "testUserName"
    accessString: "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember"
    engine: "REDIS"
    region: us-west-1
    passwordsSecretRef:
      - name: test-slice-1
        namespace: crossplane-system
        key: pwd
      - name: test-slice-2
        namespace: crossplane-system
        key: pwd
  writeConnectionSecretToRef:
    name: test-conn
    namespace: default
  • The external resource was successfully created and the connection secret had the correct values.

@sergenyalcin sergenyalcin self-assigned this Jan 11, 2022
@sergenyalcin sergenyalcin force-pushed the elasticacheuser_sensitive_support branch from ae8fb3a to 6299bf3 Compare January 11, 2022 12:13
@sergenyalcin sergenyalcin marked this pull request as ready for review January 14, 2022 06:38
Copy link
Member

@muvaf muvaf left a comment

Choose a reason for hiding this comment

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

I think the blocking issue is fixed now, so we can merge this once the go.mod is updated. Thanks!

@sergenyalcin sergenyalcin force-pushed the elasticacheuser_sensitive_support branch from 6299bf3 to 9b7b38b Compare February 3, 2022 11:37
@muvaf
Copy link
Member

muvaf commented Mar 1, 2022

@sergenyalcin Is there anything blocking this? It seems fine to merge after resolving the conflicts.

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
@sergenyalcin sergenyalcin force-pushed the elasticacheuser_sensitive_support branch from 9b7b38b to 682f06a Compare March 1, 2022 16:12
@sergenyalcin
Copy link
Collaborator Author

@sergenyalcin Is there anything blocking this? It seems fine to merge after resolving the conflicts.

Conflicts were resolved!

@sergenyalcin sergenyalcin merged commit b6775e2 into crossplane-contrib:main Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants