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

feat(zbctl): allows scope to be supplied via command line parameter #17429

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

jessesimpson36
Copy link
Contributor

@jessesimpson36 jessesimpson36 commented Apr 10, 2024

example usage:

./zbctl --address zeebe-gateway.dev.jlscode.com:443 \
    --clientId zeebe \
    --clientSecret EasySecret \
    --authzUrl 'https://dev.jlscode.com/auth/realms/camunda-platform/protocol/openid-connect/token' \
    --audience zeebe-api --scope camunda-identity status

Description

This allows users to set the scope for zbctl. For some reason, this scope attribute appears mandatory in 8.5 when installed with identity. I'm not sure why.

Related issues

closes #

@github-actions github-actions bot added the component/zeebe Related to the Zeebe component/team label Apr 10, 2024
@lenaschoenburg lenaschoenburg requested a review from a team April 11, 2024 06:22
Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

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

I would suggest making the help message consistent with the other options. Other than that, looks good :)

That said, I assume just setting the env var now without the flag would work anyway, no? 🤷

clients/go/cmd/zbctl/internal/commands/root.go Outdated Show resolved Hide resolved
@jessesimpson36
Copy link
Contributor Author

I think you're right, the environment variable would work. However, I started writing this PR before I knew the environment variable existed. by that point, might as well follow through.

@mustafadagher
Copy link
Contributor

@jessesimpson36
❌ May I ask you to squash your commits into one with the message that follows our Contributions Guide?
PS: your first commit message was perfect! It's the second one that was generated by accepting github suggestion that's the issue

❌ Also, can you please rebase your PR branch on main to pass the Tasklist merge queue CI?

Thanks

example usage:

./zbctl --address HOSTNAME:443 \
    --clientId zeebe \
    --clientSecret EasySecret \
    --authzUrl 'https://HOSTNAME/auth/realms/camunda-platform/protocol/openid-connect/token' \
    --audience zeebe-api --scope camunda-identity status

Update clients/go/cmd/zbctl/internal/commands/root.go

Co-authored-by: Nicolas Pepin-Perreault <43373+npepinpe@users.noreply.github.com>
@jessesimpson36
Copy link
Contributor Author

Sounds good. I rebased on main, and squashed the 2nd commit since it wasn't necessary to have that commit on it's own.

Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

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

👍

@npepinpe npepinpe enabled auto-merge April 17, 2024 13:27
@npepinpe npepinpe added the backport stable/8.5 Backport a pull request to stable/8.5 label Apr 17, 2024
@npepinpe
Copy link
Member

npepinpe commented Apr 17, 2024

While not a bug fix, I think it's small enough to backport to 8.5, and as you mentioned this is more or less required for users on 8.5, so I'll trigger a backport on merge.

@npepinpe npepinpe added this pull request to the merge queue Apr 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 17, 2024
@mustafadagher mustafadagher added this pull request to the merge queue Apr 17, 2024
Merged via the queue into main with commit 1d17cc9 Apr 17, 2024
39 checks passed
@mustafadagher mustafadagher deleted the jesse-wants-scopes branch April 17, 2024 15:47
Copy link
Contributor

Git push to origin failed for stable/8.5 with exitcode 1

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.5:

github-merge-queue bot pushed a commit that referenced this pull request Apr 17, 2024
…mmand line parameter (#17553)

# Description
Backport of #17429 to `stable/8.5`.

relates to
original author: @jessesimpson36
@megglos
Copy link
Contributor

megglos commented May 2, 2024

FYI the scope param is actually optional in the default SM setups, the failure on the scope was a bug in the go client, a fix is ready

@Zelldon Zelldon added the version:8.5.1 Marks an issue as being completely or in parts released in 8.5.1 label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.5 Backport a pull request to stable/8.5 component/zeebe Related to the Zeebe component/team version:8.5.1 Marks an issue as being completely or in parts released in 8.5.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants