huguesgr / huguesgr.jwks_jwt / 0.1.0 / module / generate Generate a JWKS along with a valid JWT Authors: Hugues Granger (@huguesgr)huguesgr.jwks_jwt.generate (0.1.0) — module
Install with ansible-galaxy collection install huguesgr.jwks_jwt:==0.1.0
collections: - name: huguesgr.jwks_jwt version: 0.1.0
This module generates a JWKS containing a single JWK, along with a signed JWT which never expires
- name: Test JWKS generation huguesgr.jwks_jwt.generate: issuer: myissuer subject: mysubject expiry: 3600
expiry: description: JWT expiration in days after generation. Token will not expire if this option is not set. required: false type: int issuer: description: JWKS issuer required: true type: str subject: description: JWKS subject required: true type: str key_size: description: key size parameter for RSA key generation required: false type: int public_exponent: description: public exponent parameter for RSA key generation required: false type: int
jwks: description: JWKS returned: always sample: '{"keys":[{"kty": "RSA", "key_ops": ["verify"], "n": "u8iLUp71u3y59jAWsBHLPwcnXY9Dugu-7YtBb9LXYHnYa6FcLiY7asQC7i8eOkXK4x2I-P5Wh-05NnRxVbJMR_VF0oMtGKpbeqoHmNdfrcAF87Y5xMTX4s9YA9Ii_6XMvdHvrX03XWWTrKvY_RD9YYjMCUIC309TmunZxFqh_EXW6sBAgmkpzgcFLiw_rzwQ0diqE9uQZlDqnV3jcBd0wOQqV9D-A59sen8tkR1GM-5VtxlNWv_9ztQQvOg-tdjLYaEh8ST6qi15MkNGea2HidYqDpKOzYbwUGBbIofq1lShhssZQ_3hOU84ANg6OjNrg7bB3mfDJtudGyGVXmSiCQ", "e": "AQAB"}]}' type: str jwt: description: JWT signed with JWKS returned: always sample: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJobGFiIiwic3ViIjoiaGxhYiJ9.PT2VfFyLCWLICdRwbAk0riCxAvz5F7uWHQin7mlwJgJhQ9RhfAvK9awJi3H3PCS-9QD_v2RbQ0QobuOyOxtku7-FU72FLVjL9XVIhHS_dWT0gaiqm2IQbLJmXrqGKzY6SEAe0zqOUFG5TBeyObYjyfo8XOnFmNsDMldsERlcP95bDbuaEtlPLPtkagnoiIeZtlq-p4qEFg55NVSsEE1CARy1BGvHetHYUpYhHWLFtFioqkr88BU8SOqB7LkaLn0tHZbWJXcHjjvNFMogUgye_0RD7MSGPSo0_jNp6RTE_zm0N81SbUmuz0ly_nM8EQ8bYjWI0h4AgTWw1YBH3Qkvrg type: str