Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add basic sample app that works w/ project admin #34

Closed
wants to merge 1 commit into from

Conversation

weshayutin
Copy link
Contributor

  • this app requires the non-admin user to be a namespace admin.
  • namespace must be created by cluster-admin
  • non-admin roles and role-bindings applied to namespace

Copy link

openshift-ci bot commented Apr 5, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: weshayutin
Once this PR has been reviewed and has the lgtm label, please assign rayfordj for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Choose a reason for hiding this comment

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

Can this be renamed to something that more obviously hints about the contents? I'm not sure what "SC" would stand for in this context.

Copy link
Contributor

Choose a reason for hiding this comment

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

why 2 separated files?

volumes:
- '*'
users:
- system: nacuser
Copy link
Contributor

Choose a reason for hiding this comment

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

if created user has different name, it will work? (should this have space between : ?)

Copy link
Contributor

@mateusoliveira43 mateusoliveira43 left a comment

Choose a reason for hiding this comment

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

need documentation on how to use files

@mpryc
Copy link
Collaborator

mpryc commented Apr 8, 2024

Should there be an example of how to create non admin user (on top of below there is need to grant nacuser with ns admin)?

E.G.:

# Create test NS

$ oc create ns mysql-persistent
namespace/mysql-persistent created


# Create identity file with user nacuser that has password SamplePassword

$ htpasswd -c -B -b ./users_file.htpasswd nacuser SamplePassword
Adding password for user nacuser

# Create secret with the above htpasswd file in OpenShift

$ oc create secret generic htpass-secret --from-file=htpasswd=./users_file.htpasswd -n openshift-config
secret/htpass-secret created

# Create OAuth file and apply it OpenShift


$ cat > oauth-nacuser.yaml <<EOF
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
  - name: oadp_nac_test_provider 
    mappingMethod: claim 
    type: HTPasswd
    htpasswd:
      fileData:
        name: htpass-secret 
EOF

$ oc apply -f oauth-nacuser.yaml

@mateusoliveira43
Copy link
Contributor

@weshayutin can we close this one and discuss in #16 ? In last commit added mysql template

@weshayutin
Copy link
Contributor Author

weshayutin commented Apr 11, 2024 via email

@shubham-pampattiwar
Copy link
Member

Already merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants