Skip to content

Not able to create JWK service from a JWKSet service using symfony bundle #436

Closed
@tomme87

Description

@tomme87

Version(s) affected

3.1.6

Description

If the key I'm I want to get from the JWKSet has kid, the index is a string, but I'm not able to specify a string as index in config for the symfony bundle.

I get the error Invalid type for path "jose.keys.key_name.jwkset.index". Expected "int", but got "string"

And if I set 0 as index i get "Undefined index" (since the index is the kid)

How to reproduce

jose:
    key_sets:
        my_key_set:
            jwkset:
                value: '{"keys":[{"kid":"855dc4e5-e1f9-494c-9e5d-125056e40fc4","kty":"oct","k":"dzI6nbW4OcNF-AtfxGAmuyz7IpHRudBI0WgGjZWgaRJt6prBn3DARXgUR8NVwKhfL43QBIU2Un3AvCGCHRgY4TbEqhOi8-i98xxmCggNjde4oaW6wkJ2NgM3Ss9SOX9zS3lcVzdCMdum-RwVJ301kbin4UtGztuzJBeg5oVN00MGxjC2xWwyI0tgXVs-zJs5WlafCuGfX1HrVkIf5bvpE0MQCSjdJpSeVao6-RSTYDajZf7T88a2eVjeW31mMAg-jzAWfUrii61T_bYPJFOXW8kkRWoa1InLRdG6bKB9wQs9-VdXZP60Q4Yuj_WZ-lO7qV9AEFrUkkjpaDgZT86w2g"},{"kty":"oct","k":"bwIAv5Nn-fo8p4LCEvM4IR9eLXgzJRs8jXCLb3xR0tDJGiZ46KheO4ip6htFKyN2aqJqlNi9-7hB6I1aLLy1IRT9-vcBoCSGu977cNAUuRLkRp7vo8s6MsxhB8WvQBDRZghV7jIYaune-3vbE7iDU2AESr8BUtorckLoO9uW__fIabaa3hJMMQIHCzYQbJKZvlCRCKWMk2H_zuS4JeDFTvyZH1skJYF_TET1DrCZHMPicw-Yk3_m2P-ilC-yidPPoVzeU8Jj3tQ6gtX3975qiQW7pt2qbgjKAuq2wsz_9hxLBtMB5rQPafFoxop7O4BklvZ9-ECcK6dfI2CAx9_tjQ"}]}'
    keys:
        key_name:
            jwkset:
                key_set: 'jose.key_set.my_key_set'
                index: '855dc4e5-e1f9-494c-9e5d-125056e40fc4'

Possible Solution

Allow string as index

Additional Context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions