oat-sa / bundle-lti1p3

Symfony bundle for LTI 1.3 implementations, as platforms and / or as tools.
GNU Lesser General Public License v2.1
9 stars 10 forks source link

Unable to configure registration with external platform due to requiring platform_key_chain #48

Closed ionparticle closed 3 years ago

ionparticle commented 3 years ago

An external platform using JWKS doesn't need a key chain, but if you leave the platform_key_chain config out, you get an 500 error complaining about undefined array key "platform_key_chain".

ekkinox commented 3 years ago

Hello @ionparticle

Thx for feedback.

You can configure an external platform that provided only JWKS, this way:

    registrations:
        example:
            client_id: "client_id"
            platform: "externalPlatform"
            tool: "myTool"
            deployment_ids:
                - "1"
                - "2"
            platform_key_chain: null
            tool_key_chain: "toolKey"
            platform_jwks_url: "https://external-platform/.well-known/jwks"
            tool_jwks_url: "https://my-tool/lti1p3/.well-known/jwks/toolSet.json"

I think it's because you removed the platform_key_chain instead of putting it to null (as in example above)

Also, if you need more details how this bundle internally works with JWKS vs key files, you can check here.

Can you confirm it works with platform_key_chain: null ?

If yes, let me know so we can close this issue .

ekkinox commented 3 years ago

Hello @ionparticle

I tested to be sure with null value as described above, it works.

I close the issue.

Thx again for feedback !

ionparticle commented 3 years ago

You're right, null worked for me, thanks for the clarification.

May I suggest changing the documentation, for clarity, to say that these are "nullable" values instead of "optional"? When I see optional, as a user, I usually think "can be omitted" rather than "can be nulled" (e.g.: command line parameters, php function optional parameters).

ekkinox commented 3 years ago

@ionparticle you can find in release 6.1.0 the possibility to omit the optional config keys.

Documentation is updated.