Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

add SIGNATURE_ALGORITHM as argument to CryptoRSA signature-methods #14

Open
steadyjaw opened this issue Jul 20, 2023 · 0 comments
Open

Comments

@steadyjaw
Copy link

Is your feature request related to a problem? Please describe.

I was trying to use this plugin to sign HTTP request with the REST plugin.
The API we're trying to talk to from the orchstrator needs an HTTP header signature signed with SHA256withRSA

unfortunately the CryptoRSAService only uses a SIGNATURE_ALGORITHM of NONEwithRSA and is not able to create signatures with another algorithm
https://github.com/vmware/o11n-plugin-crypto/blob/ca366a464f09ba855daef4cc3af22a98452841f6/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoRSAService.java#L36

According to the Java documentation at least the following algorithms are standard:

  • SHA1withDSA
  • SHA256withDSA
  • SHA1withRSA
  • SHA256withRSA

It'd help me a lot, if the algorithms could be choosen as an argument on mehtods createSignature and verifySignature

Describe the solution you'd like

add argument String algorithm to methods:

  • CryptoRSA.createSignature
  • CryptoRSA.verfiySignature
  • use provided algorithm in sign and verifySignatrure functions
  • fall back to attribute SIGNATURE_ALGORITHM if no algorithm was provided
  • at least the follwing algorithms are valid (according to java documentation)
    -- SHA1withDSA
    -- SHA256withDSA
    -- SHA1withRSA
    -- SHA256withRSA

Describe alternatives you've considered

No response

Additional context

No response

@dlinsley dlinsley self-assigned this Oct 24, 2023
@dlinsley dlinsley removed their assignment Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants