Repository navigation
Conversation
…tion The audit catalog was a Rust table kept in step with the proto's write-scoped RPCs only by a unit test. The authorization option now carries an audit activity, and the gateway refuses to start when an RPC with a *:write scope omits one. The table is removed, and the audit layer reads each method's activity from its descriptor. Refs #2911 Signed-off-by: Kris Hicks <khicks@nvidia.com>
krishicks
enabled auto-merge
November 20, 2026 21:15
This branch has not been deployed
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.
Summary
The audit catalog was a Rust table (
auth/audit/catalog.rs) that a unit test kept in step with the proto's*:writeRPCs. A new write RPC could therefore be added to the proto without declaring how it is audited, and only CI noticed.The
(openshell.options.v1.authorization)option now carries anauditactivity (create,update,delete,other, orread). The gateway refuses to build its authorization table, and so refuses to start, when an RPC with a*:writescope omits it or declaresread. The table is removed; the audit layer reads each method's activity from its descriptor entry.proto/options.proto:string audit = 5onAuthorizationRule. Additive; the option is gateway-side method metadata and never crosses the wire.proto/openshell.proto: the 44 previously cataloged methods carry the same activity as before.RevealSecretdeclaresread.descriptor_authz.rs: parses and validatesaudit.audit.rs: looks the activity up from the descriptor.proto/README.md: the write-RPC rule names theauditfield instead of the catalog file.Resource naming in the handler hooks is unchanged and still depends on review.
Testing
check-protobuf-compatibilityagainstmainexits 0.cargo clippy -p openshell-server --all-targetsis clean.openshell-serverauth::(201) andmutation_audit(33) tests pass, as doespublic_and_durable_schema_inventories_are_completewith its fingerprints unchanged.write_scoped_rpc_must_declare_auditcovers the missing,read, unknown, and valid cases.Closes #2911