Skip to content

Support reading in more complex values from query parameters  #61

@joe94

Description

@joe94

Context

Currently, Themis can only read in simple claim values from parameters.

For example, today you can tell Themis to "read in the value for this claim from the parameters" like so in config:

claims:
    mac_claim:
        parameter: mac

so when requesting a JWT
curl http://themis/issue?mac=1122334455566

you will get a JWT with the relevant claim:

mac_claim:112233445566

Task

Now, say we want set the value of a claim called "human" to be something like:

{
    "age": 45
    "names: ["Awesome", "Themis"]
}

To do so, the config would stay the same:

claims
    human:
        parameter: human

and on request (subject to change - more experimenting needed)
curl http:themis/issue?human.age=45&human.names=Awesome&human.names=Themis

a claim would be provided like so:

human: 
    age: 45
    names: ["Awesome","Themis"]

Notes:

  • From discussions with teammates, it seems like it will be less of an anti-pattern to keep this change localized to parameters and not HTTP headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions