Skip to content
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

Create option to specify custom options/properties in request builder to be passed down in the SignRequest during the signing stage #3070

Open
2 tasks
HarshitGupta11 opened this issue Dec 18, 2023 · 1 comment
Assignees
Labels
closing-soon This issue will close in 2 days unless further comments are made. feature-request A feature should be added or improved. wontfix We have determined that we will not resolve the issue.

Comments

@HarshitGupta11
Copy link

HarshitGupta11 commented Dec 18, 2023

Describe the feature

Currently only the signer options/properties are added to the SignRequest for signing, it would be nice to have custom properties in the SignRequest that are added when the request is build so that we can update custom signing flows.

Use Case

Custom Signing flows would improve as user would have some freedom to pass certain attributes that the signer can pick up. It would be good for auditing purposes as well.

Proposed Solution

Ideally we would like to have something like:

Request.Builder builder = Request.builder();
builder.setProperty(custom_property)
builder.build()

And when it comes in the signer:

public SignedRequest sign(SignRequest<? extends AwsCredentialsIdentity> toSignRequest){
    Property customProperty = toSignRequest.property(custom_property);
.
.
}

No response

Other Information

This is a example on how we used to do things in a earlier context with audit spans.
Earlier we were able to attach audit span to the request like:

  public <T extends AmazonWebServiceRequest> T beforeExecution(
      final T request) {
    ioStatisticsStore.incrementCounter(AUDIT_REQUEST_EXECUTION.getSymbol());

    // identify the span and invoke the callback
    try {
      return extractAndActivateSpanFromRequest(request)
          .beforeExecution(request);
    } catch (AuditFailureException e) {
      ioStatisticsStore.incrementCounter(AUDIT_FAILURE.getSymbol());
      throw e;
    }
  }

And retrieve it using:

  private String retrieveOperationName(SignableRequest<?> request) {
    if (request instanceof HandlerContextAware) {
      AWSAuditEventCallbacks awsAuditEventCallbacks = retrieveAttachedSpan((HandlerContextAware) request);
      if (awsAuditEventCallbacks != null) {
        String opName = awsAuditEventCallbacks.getOperationName();
        return getOpNameWithoutPrefix(opName);
      }
    }
    LOG.debug("Unable to figure out operation name from incoming request." +
            "So setting to {}", UNKNOWN_OP_NAME);
    return UNKNOWN_OP_NAME;
  }

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.21.46

JDK version used

1.8

Operating System and version

Mac OS X

@HarshitGupta11 HarshitGupta11 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2023
@debora-ito debora-ito self-assigned this May 14, 2024
@debora-ito
Copy link
Member

@HarshitGupta11 apologies for the long delay in replying.

We don't have plans to support custom signing flows in Java SDK v1.

This may be supported in Java SDK v2 with the recent addition of authentication schemes - we don't have a lot of documentation around it yet but we'll work on it.

@debora-ito debora-ito added closing-soon This issue will close in 2 days unless further comments are made. wontfix We have determined that we will not resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will close in 2 days unless further comments are made. feature-request A feature should be added or improved. wontfix We have determined that we will not resolve the issue.
Projects
None yet
Development

No branches or pull requests

2 participants