Skip to content

Integrate with Opencast's Login View #37

Description

@lkiesow

The Opencast 2.x+ admin interface comes with a login view built-in. This means that on the admin node, the login process works somewhat like this:

  • You access a resource that is protected (like /) but aren't authenticated to Opencast
  • Spring security will redirect you to the login-page
    • Spring will remember the site you tried to access
  • You log into Opencast
    • Spring will redirect you to the site you wanted to access
    • There are a few exceptions to this. The details I don't accurately remember, but they are along the lines of, you aren't redirected to any JSON or XML APIs and if you tried accessing / you are redirected to the admin interface instead.
  • You are logged in and ready to work with Opencast

The problem is what happens if you try accessing a non-admin node like a worker? There is no admin interface and therefor no login view. Before 2.0 that was not a problem since the login page was part of the runtime-info-ui package which existed on all nodes.

As a short-term workaround, the Opencast developers copied runtime-info-ui to runtime-info-ui-ng which is the same module just without the login page. The -ng variant got deployed on the admin node, the other one on all other nodes. Additionally, the path of the pre 2.0 login form and the dashboard present on the non-admin nodes got adjusted so that the paths are identical to the admin interface.

The admin interface Picard has no login form. This is good because that means we can have one module on all nodes containing the login form. That can be mostly what is in runtime-info-ui for now. There are a few things we need to take care of, though:

  • The paths of the login view in runtime-info-ui matches the 2.x admin interface. We can and should get rid of the admin-ng part.
  • If no path is given, the user should be forwarded to the admin interface on the admin and to something else sensible on all other nodes
    • We should be able to detect if the admin interface module is present on the node in the Java code which takes care of the HTTP redirect
    • Instead of the dashboard currently on the non-admin nodes, we could just forward to the REST docs directly. There is nothing useful left on the dashboard anyway. That also means that we can remove the dashboard code from the runtime-info-ui module

Regardless of the login view and the runtime-info-ui module, we also need to make sure that users are redirected to the new admin interface after login.


The old dashboard on non-admin nodes which I would just remove:

Screenshot from 2023-01-19 22-57-16

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions