Use PKCS#8 public key to sign a JWT token
Budget: $30 – $250 AUD
I have attached the code that creates a HS256 JTW token with a string secret "my-secret"
If I run this code I get the JWT and can verify the signature by using the secret with the https://jwt.io/ debugger
Now, I have a file in the bundle that is called "cert.pem", which is a PKCS#8 public key with this content
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwBt3DQ6NHD6fGnq1yMlI
M71kL16/ySj6ZqmnKRGqIkPkXvTf5ZY4UUy3agbio8u49ULhW4iXa6h8t+GHLBPv
rL48YAggLwYaJaTmpM058ic3k0ed0MV2PoQEoVj+UyjD1tuqIqfNq9SxFkEmLjHU
TSBILEgS1dm0cxq6XRIXPtaEWYJsFruy9fXdzXica5Rrp5rrmKXHDmaR+5v/oX8B
mH+Yxd+hkSPRZPDN5aNsAeZeUnGrtgKYXxLBxPx27/UoiKaJ9qkVtTnzYqSzYWl/
HKr64PMiNdOi3nzqBs7Gx5BPA0k/O2B74kckuD7Z7Hu7qIDgxq1l4RS5bpIdaDYY
lQIDAQAH
-----END PUBLIC KEY-----
I need someone that can load this public key file and use it as a signature. Ideally using the existing code if possible.
This JWT token will then be used for pen testing a server where the the server should expect a RS256 JTW token with the same public key and a private key.
Acceptance criteria for this project is to create a JTW token, go to https://jwt.io/ and successfully verifying the signature by pasting the public key content above in the secret field.
If I run this code I get the JWT and can verify the signature by using the secret with the https://jwt.io/ debugger
Now, I have a file in the bundle that is called "cert.pem", which is a PKCS#8 public key with this content
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwBt3DQ6NHD6fGnq1yMlI
M71kL16/ySj6ZqmnKRGqIkPkXvTf5ZY4UUy3agbio8u49ULhW4iXa6h8t+GHLBPv
rL48YAggLwYaJaTmpM058ic3k0ed0MV2PoQEoVj+UyjD1tuqIqfNq9SxFkEmLjHU
TSBILEgS1dm0cxq6XRIXPtaEWYJsFruy9fXdzXica5Rrp5rrmKXHDmaR+5v/oX8B
mH+Yxd+hkSPRZPDN5aNsAeZeUnGrtgKYXxLBxPx27/UoiKaJ9qkVtTnzYqSzYWl/
HKr64PMiNdOi3nzqBs7Gx5BPA0k/O2B74kckuD7Z7Hu7qIDgxq1l4RS5bpIdaDYY
lQIDAQAH
-----END PUBLIC KEY-----
I need someone that can load this public key file and use it as a signature. Ideally using the existing code if possible.
This JWT token will then be used for pen testing a server where the the server should expect a RS256 JTW token with the same public key and a private key.
Acceptance criteria for this project is to create a JTW token, go to https://jwt.io/ and successfully verifying the signature by pasting the public key content above in the secret field.
Related categories:
Swift