Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-59103

SecretStore created with restricted AWS credentials incorrectly reports ReadWrite

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 5
    • Important
    • None
    • None
    • None
    • Rejected
    • None
    • In Progress
    • Release Note Not Required
    • None
    • None
    • None
    • None
    • None

      SecretStore shows ReadWrite, but SecretStore created with credentials that do not have the secretsmanager:GetSecretValue permission

      Description of problem:

          When a SecretStore is created with aws_minimal_permission credentials, the oc get ss command indicates a STATUS of Valid and CAPABILITIES of ReadWrite for the SecretStore. However, during an actual attempt to retrieve a Secret value from AWS Secrets Manager using this SecretStore, the logs show an AccessDeniedException, explicitly stating that the IAM user lacks the secretsmanager:GetSecretValue permission. This contradicts the information provided by oc get ss, leading to misinterpretation of the actual permission status by the user.

      Version-Release number of selected component (if applicable):

      jitli@RedHat:~/work/src/test/eso$ oc get csv
      NAME                               DISPLAY                                           VERSION   REPLACES   PHASE
      external-secrets-operator.v0.1.0   External Secrets Operator for Red Hat OpenShift   0.1.0                Succeeded

      How reproducible:

          

      Steps to Reproduce:

        Use an IAM user arn:aws:iam::30172115996:user/ci-op-07j5f2q-acb76-minimal-perm-installer that currently does not have secretsmanager:GetSecretValue permission granted.
      In an OpenShift cluster, create a SecretStore using the aforementioned AWS credentials.Bash
      jitli@RedHat:~/work/src/test/eso$ oc get ss
      NAME                  AGE   STATUS   CAPABILITIES   READY
      aws-secrets-manager   19m   Valid    ReadWrite      True
      (Assuming aws-secrets-manager is the name of the created SecretStore)
      Attempt to access or synchronize an AWS Secrets Manager Secret named jitliSecret via this SecretStore.     

      Actual results:

         jitli@RedHat:~/work/src/test/eso$ oc logs -n external-secrets external-secrets-78944c9c88-58h55
      
      err: AccessDeniedException: User: arn:aws:iam::301721915996:user/ci-op-07j5pf2q-acb76-minimal-perm-installer is not authorized to perform: secretsmanager:GetSecretValue on resource: jitliSecret because no identity-based policy allows the secretsmanager:GetSecretValue action\n\tstatus code: 400, "

      Expected results:

          The minimal_permission privilege will indeed report an insufficient permission error. 
      The CAPABILITIES field of oc get ss should accurately reflect the actual permissions of the underlying AWS credentials.

      Additional info:

          

              bhb@redhat.com Bharath B
              rhn-support-jitli Keenon Lee
              None
              None
              Keenon Lee Keenon Lee
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: