Repository navigation
Raise the session privilege on demand: privilege(MaximumAvailable), ipmicli -L auto - #195
Merged
Conversation
…pmicli -L auto The builder accepts PrivilegeLevel.MaximumAvailable: the session logs in with the highest role the account is allowed (Administrator, then Operator and User when the BMC refuses the role), is set to User right after the handshake, and is raised with Set Session Privilege Level only when the BMC refuses a command for insufficient privilege (D4h), to Operator then Administrator, the refused command being sent again. A level the BMC refuses is the ceiling of the session for its lifetime, and a session the BMC revoked is asked once. A raw request whose D4h is returned, not thrown, is raised the same way. ipmicli takes -L auto, with its own hint at the ceiling. The role 0h of the specification (highest level matching the proposed algorithms) is not used: on the lab it is refused at Open Session by iLO 5, iDRAC and Cisco IMC BMCs, and leaves a session that IMM, Supermicro and iRMC BMCs will not set to any level (D4h on Set Session Privilege Level). The fake BMC models the limit of the account (unauthorized role at RAKP 2, 81h at Set Session Privilege Level), a session started at its maximum, and the privilege Send Message needs. Closes #194 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 968db1eba8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… no ceiling on a busy raise Review of PR #195: the SOL console raises a MaximumAvailable session to Operator before Administrator, as far as the account allows, and the client records the level the console reached so that the next D4h is raised from there. A Set Session Privilege Level the caller sends itself, typed or raw, updates the level the client tracks. Only 80h, 81h and D4h on the raise set the ceiling of the session: any other code is the failure of the raise, thrown as such and tried again at the next D4h. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bertysentry
deleted the
194-raise-the-session-privilege-on-demand-run-at-user-raise-on-d4h-up-to-what-the-account-allows
branch
October 18, 2026 21:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #194.
What changes
IpmiClient.Builder.privilege(PrivilegeLevel.MaximumAvailable)is accepted: the session logs in with the highest role the account is allowed (Administrator, then Operator and User when the BMC refuses the role at RAKP 2 with0Ah/09h), is set to User right after the handshake, and is raised with Set Session Privilege Level only when the BMC refuses a command for insufficient privilege (D4h): to Operator, then to Administrator, and the refused command, which the BMC did not carry out, is sent again (even a send-once control command). A level the BMC refuses (80h,81h, or anything else: a revoked session answersD4hto the raise too, HP iLO 4 answers Get SDR with InsufficientPrivilege (D4h) intermittently and the whole walk fails #146) is the ceiling of the session for its lifetime. A raw request whoseD4his returned, not thrown, is raised the same way.openSession()of a connection created withMaximumAvailableruns the login ladder and sets the session to User (some BMCs start it at the requested maximum, Low-level sessions stay at the User privilege on iDRAC, iLO 5, XCC and Cisco IMC: openSession() never sends Set Session Privilege Level #165); the SOL console still raises such a session itself.ipmicli -L auto, with its own hint when theD4hcomes at the ceiling of the account.FakeRmcpPlusBmc:privilegeLimit(int)(unauthorized role at RAKP 2,81hat Set Session Privilege Level),startsAtMaximum(boolean),sendMessagePrivilege(int),getPrivilege().Departure from the issue: no role
0hat loginThe issue proposed requesting role
0h("highest level matching proposed algorithms", IPMI 2.0 section 13.17) at Open Session and RAKP 1. Live on the lab it is unusable:0hat loginIllegal or unrecognized parameterInvalid authentication algorithmInvalid integrity check valueD4hSo the login requests a concrete role, from Administrator down. On the Lenovo IMM, a session logged in at Administrator lowers to User (
02), and a session logged in at User cannot be raised (81h): the session maximum is the login role, as the issue assumed.Live results (2026-10-17,
ipmiclistandalone jar)-L auto, Get Session Info (raw 0x06 0x3d 0x00)02(User) on every one, including the BMCs that start the session at the requested maximumidentify 1at-L autoD4hat-L userand at-L operator00hat-L auto(two raises)sensors --longat-L userand-L autoNot reproduced on real hardware: the role refusal at RAKP 2 (an account below Administrator). Every lab account, the iLO
metricshubservice account included, is Administrator, so that branch of the ladder, the81hceiling and the revoked-session case are covered by the fake BMC only (RmcpPlusSessionTest,IpmiClientTest,IpmiCliTest). A User-level lab account would let the ladder be checked live.Build
mvn verify sitepasses (checkstyle, PMD, CPD at 100 tokens, SpotBugs, Javadoc). Two existing tests were adjusted for the new behaviour: the-Lusage message, and the SOL test that counts the Set Session Privilege Level of aMaximumAvailablesession (one more: the drop to User).🤖 Generated with Claude Code