How do I use JFrog OIDC credentials to run a container in another job?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, typescript
- Lĩnh vực
- authentication, ci-cd
Hướng nghiên cứu
Start by reading src/oidc-utils.ts around the core.setSecret calls identified in the issue, and trace how the OIDC username and token become action outputs. Consider the interaction between secret masking and GitHub Actions job outputs before proposing a change. Done means the credentials can be passed to another job as described without compromising their handling.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Currently, it's not possible to obtain OIDC credentials and then use them to run code on a different container
Mainly because {{ steps.jfrog.outputs.oidc-user }} and {{ steps.jfrog.outputs.oidc-password }} are marked as secrets using
https://github.com/jfrog/setup-jfrog-cli/blob/v5.3.0/src/oidc-utils.ts#L159
core.setSecret(accessToken);
core.setSecret(username);
by forking the repo and removing this lines, I was successfully able to do this:
name: Run a Container Hosted In Jfrog
run-name: Run a Container Hosted In Jfrog
permissions:
contents: read
id-token: write
on:
workflow_dispatch:
jobs:
jfrog_auth:
name: "JFrog Authentication"
runs-on: default
outputs:
jfrog_username: ${{ steps.jfrog.outputs.oidc-user }}
jfrog_password: ${{ steps.jfrog.outputs.oidc-token }}
steps:
- name: Setup JFrog CLI (OIDC)
id: jfrog
uses: jfrog/setup-jfrog-cli@v5
with:
oidc-provider-name: MY_OIDC_PROVIDER_NAME
oidc-audience: MY_OIDC_AUDIENCE
env:
JF_URL: https://MYORG.jfrog.io
next_gen_web:
runs-on: default
needs: jfrog_auth
container:
image: MYORG.jfrog.io/MY_PATH/MY_CONTAINER:latest
credentials:
username: "${{ needs.jfrog_auth.outputs.jfrog_username }}"
password: "${{ needs.jfrog_auth.outputs.jfrog_password }}"
steps:
- run: |
echo "This is running from inside of MYORG.jfrog.io/MY_PATH/MY_CONTAINER:latest"
Current behavior
oidc-user and oidc-password can not be transmitted between jobs
Reproduction steps
the code above
Expected behavior
the code above should work
Setup JFrog CLI version
jfrog/setup-jfrog-cli@v5
JFrog CLI version
none
Workflow operating system type and version
github actions
JFrog Artifactory version (if relevant)
No response
JFrog Xray version (if relevant)
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 267
- Fork
- 111
- Merge trung bình
- 10 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jfrog/setup-jfrog-cli
-
Ghost mode continues to intercept commands after POST configuration step within GitHub ActionsĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
jfrog/setup-jfrog-cli#349 ·
-
feature request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
jfrog/setup-jfrog-cli#348 ·
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
jfrog/setup-jfrog-cli#347 · 1 bình luận ·
-
`enable-package-alias: true` installs the alias but never activates it (`JFROG_CLI_GHOST_FROG` is never set)Có thể đã có người làm @amarkdotdev đã nhận 61 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
jfrog/setup-jfrog-cli#343 · 1 reaction ·
-
Cleanup is not running on self-hosted runners when using server configCó thể đã có người làm @omribz156 đã nhận 144 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
jfrog/setup-jfrog-cli#339 ·
Tất cả issue của jfrog/setup-jfrog-cli
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
components-web-app/docs#260 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
521xueweihan/HelloGitHub#4025 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ctrf-io/playwright-ctrf-json-reporter#117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
voidzero-dev/void#478 ·
Maintainer thường phản hồi trong vòng 1 ngày