Skip to content

KC-1553: Enforce gateway permissions on pam gateway edit and set-max-instaces (#2571) - #2583

Merged
craiglurey merged 1 commit into
releasefrom
fix/pam-gateway-edit
Nov 27, 2026
Merged

craiglurey merged 1 commit into
releasefrom
fix/pam-gateway-edit

Conversation

@ukumar-ks

Copy link
Copy Markdown
Contributor

Summary

Some users could rename a Gateway or change its max instances from the Commander CLI even though they had no access to it. These two commands were missing the permission checks that the other gateway commands already have. This PR adds those checks.

Changes

  • pam gateway edit and pam gateway set-max-instances now check the user's role. If the role doesn't allow Gateway management, the command stops with a clear message and nothing is changed.
  • Both commands now check access to the Gateway's application. If the user has no access to the Gateway's KSM Application, the command stops with an "Access denied" error. This matches what the web vault shows.
  • New tests in unit-tests/pam/test_gateway_enforcement_gate.py: 8 cases covering role denied, no application access, and the normal allowed case for both commands.

@craiglurey
craiglurey merged commit 68e758e into release Nov 27, 2026
4 checks passed
@sk-keeper
sk-keeper deleted the fix/pam-gateway-edit branch November 28, 2026 04:08
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

Successfully merging this pull request may close these issues.

2 participants