-
Notifications
You must be signed in to change notification settings - Fork 217
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
Audit in programmability sample #6258
Audit in programmability sample #6258
Conversation
…achamayou/CCF into audit_in_programmability_sample
@@ -223,10 +228,19 @@ namespace programmabilityapp | |||
} | |||
// End of Authorization Check | |||
|
|||
const auto bundle = get_body(ctx); | |||
const auto [format, bundle] = get_body(ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is format and bundle here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See definition of get_body()
on line 52, format is an enum (AuditInputFormat) and bundle is a std::span (i.e. the actual body, which could be either JSON or COSE, as indicated by format).
For the following endpoints:
PUT /app/custom_endpoints
PATCH /app/custom_endpoints/runtime_option
Input payloads (i.e. request bodies) are logged to
public:custom_endpoints.audit.input
, and metadata is logged atpublic:custom_endpoints.audit.info
, with the following fields:format
one ofCOSE
,JSON
.content
one ofBUNDLE
,OPTIONS
.user_id
the user id of the caller.Note that only
COSE
payloads are offline verifiable, i.e. can be checked by an outside auditor without having to trust the service, since they are signed directly by the user key. For payloads that come in via client certificate authentication, the content and user id are recorded by the service, which is trusted to do this accurately.