Skip to content

implementing endpoint for approval submission#2812

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
blublinsky:approval-submission
Mar 17, 2026
Merged

implementing endpoint for approval submission#2812
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
blublinsky:approval-submission

Conversation

@blublinsky
Copy link
Copy Markdown
Contributor

Description

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@openshift-ci openshift-ci Bot requested review from joshuawilson and tisnik March 13, 2026 14:49
"""Submit user decision for a pending tool approval request."""
del auth # Auth dependency enforces request authentication.

result = set_approval_decision(request.approval_id, request.approved)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only the same user should be able to approve its own pending approvals.
We should also use user_id here and raise if a different user is trying to approve pending approvals from someone else.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not really, approval ID is unique and is reported back to the user as a response. A different user just will not know the ID

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So it is "security by obscurity".
We have all the information, it's just about adding user_id as an extra key. Do you have any particular reason why you don't want to do it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This requires changes in approval implementation. Currently, it does not have a user ID. We can do this. but it will make the overall implementation heavier. Right now, the approval event does not have a user ID. I would like to at least commit what exists now and then do another PR to add the user ID into this. I am open to having an additional PR if we need this, but at the moment I want to have what I am doing for the last month completed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I really prefer to complete the initial implementation first

@blublinsky blublinsky force-pushed the approval-submission branch from 4a7b8b3 to 6cb4b7f Compare March 16, 2026 21:52
@xrajesh
Copy link
Copy Markdown
Contributor

xrajesh commented Mar 17, 2026

LGTM - @blublinsky - Ready to merge once the test pass.

@blublinsky blublinsky force-pushed the approval-submission branch from 6cb4b7f to 22e22d0 Compare March 17, 2026 09:19
@xrajesh
Copy link
Copy Markdown
Contributor

xrajesh commented Mar 17, 2026

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 17, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrajesh

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 17, 2026

@blublinsky: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 93fffb2 into openshift:main Mar 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants