Skip to content

(new) Call security context validators during action-set validation#210

Open
mfarina1 wants to merge 12 commits into
mainfrom
184-call-security-context-validate-functions
Open

(new) Call security context validators during action-set validation#210
mfarina1 wants to merge 12 commits into
mainfrom
184-call-security-context-validate-functions

Conversation

@mfarina1

Copy link
Copy Markdown
Collaborator

This PR closes #184 and is very similar to the closed PR #190 ; however, this incorporates Josh's feedback on that old PR.

@mfarina1 mfarina1 added this to the BSL v2.0.0 milestone Jun 17, 2026
@mfarina1 mfarina1 self-assigned this Jun 17, 2026
@mfarina1 mfarina1 added this to BSL Jun 17, 2026
@github-project-automation github-project-automation Bot moved this to Todo in BSL Jun 17, 2026
@BrianSipos

Copy link
Copy Markdown
Collaborator

FYI if calls are not crossing component boundaries (i.e. between files in the same source directory) they do not need to use the frontend APIs. For example, your iterations can access the member fields directly to avoid excessive indirection.

@mfarina1 mfarina1 marked this pull request as ready for review June 22, 2026 18:49
@mfarina1 mfarina1 requested a review from a team as a code owner June 22, 2026 18:49
Comment thread src/backend/SecurityContext.c Outdated
Comment thread test/test_BackendSecurityContext.c
Comment thread src/default_sc/BCB_AES_GCM.c Outdated

@BrianSipos BrianSipos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some feedback about these edits, and about the BSL response to validation failure of individual actions.

Comment thread src/default_sc/BCB_AES_GCM.c Outdated
Comment thread src/default_sc/BIB_HMAC_SHA2.c Outdated
Comment thread src/backend/SecurityContext.c Outdated
if (!sec_ctx->validate(lib, bundle, sec_oper))
{
BSL_LOG_WARNING("Security context validator failed for context ID %" PRId64, sec_oper->context_id);
return BSL_ERR_SECURITY_CONTEXT_VALIDATION_FAILED;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does the response to this need to be more nuanced?
If a single op of a single action fails, should only that one action be affected?
Maybe the action needs a valid/invalid marking set here that the BSL can use after all validation is finished...?

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.

Refactored actions/action sets. Actions now include "validated" bool flag

Comment thread src/backend/SecurityContext.c Outdated
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Call security context validate functions in backend security context implementation

3 participants