Skip to content

Configured oauth_consumer_key not known #50

Description

@BenGig

Bug description

I am testing PR #48 with Helm chart zero-to-jupyterhub-k8s 1.1.1 as follows:

  1. I use the Docker image jupyterhub/k8s-hub:1.1.1 as base. This is working fine with the configuration below.
  2. install the latest ltiauthenticator
  3. configure the authenticator in values.yml
hub:
  config:
    LTIAuthenticator:
      consumers: {
        "aaaaaaaaaaaaaaaaaaaaaaa": "bbbbbbbbbbbbbbbbb"
        }
    JupyterHub:
      authenticator_class: ltiauthenticator.LTIAuthenticator

Expected behaviour

Authentication is working as with ltiauthenticator 1.0.0

Actual behaviour

Authentication fails. The issue raises here:

        if args["oauth_consumer_key"] not in self.consumers:
            raise HTTPError(401, "unknown oauth_consumer_key")

I think the LTI11Authenticator does not get the configuration items from the values.yml (content is {} at initialization); the attribute args["oauth_consumer_key"] contains the correct value.

I tried then to find where the configuration values are read, but I could not find that piece of code here or in JupyterHub.

Your personal set up

Kubernetes setup is straight forward. For testing, my Dockerfile to build the test environment looks like (forked the repo to add additional debugging output only):

FROM jupyterhub/k8s-hub:1.1.1

USER 0
RUN git clone https://github.com/bengig/ltiauthenticator.git && cd ltiauthenticator && git checkout jhub-integration && pip3 install .

USER 1000
CMD ["jupyterhub", "--config", "/usr/local/etc/jupyterhub/jupyterhub_config.py"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions