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

Create a secret into cluster with app auth for other tools (gitops) to reference #17

Open
tetchel opened this issue Jun 14, 2021 · 1 comment

Comments

@tetchel
Copy link
Contributor

tetchel commented Jun 14, 2021

the token should have permissions to read from the repository and put up pull requests

@tetchel
Copy link
Contributor Author

tetchel commented Jul 15, 2021

There is no frontend yet but here is what the endpoint looks like:

$ curl -sSLk https://locahost:3000/api/v1/user/github/installation/token -H "Authorization: Bearer $(oc whoami --show-token)" -X POST -d "namespace=developer&overwriteExisting=true" | jq
{
  "success": true,
  "message": "Created installation token into developer/secret/tims-openshift-actions-connector-token",
  "namespace": "developer",
  "secretName": "tims-openshift-actions-connector-token",
  "expiresAt": "2021-07-15T14:30:54Z",
  "permissions": {
    "contents": "read",
    "metadata": "read",
    "pull_requests": "write"
  }
}

$ oc describe secret tims-openshift-actions-connector-token -n developer
Name:         tims-openshift-actions-connector-token
Namespace:    developer
Labels:       app.kubernetes.io/managed-by=openshift-github-connector
              github-connector.openshift.io/created-by=kubeadmin
              github-connector.openshift.io/subtype=github-installation-token
Annotations:  created-at: 2021-07-15T13:30:55.039Z
              github-connector.openshift.io/expires-at: 2021-07-15t14-30-54z
              updated-at: 2021-07-15T13:30:55.039Z

Type:  Opaque

Data
====
expires_at:   20 bytes
permissions:  61 bytes
token:        40 bytes

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

No branches or pull requests

1 participant