Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document user with limited rights #13

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,28 @@ https://github.com/virtUOS/opencast-ca-display/assets/1008395/ead22cd2-9d7a-4d26
- The display and laptop do not know about each other
- The laptop is running an Opencast capture agent
- When the laptop starts capturing video, the display shows an active recording

## Opencast User

To improve security, you can limit the access rights for the Opencast user by
creating a user which has only read access to the capture agent status API and
nothing else.

To do this, first create a new security rule in your Opencast's
`etc/security/mh_default_org.xml` allowing read access for a new role
`ROLE_CAPTURE_AGENT_CALENDAR`:

```xml
<!-- Enable capture agent updates and ingest -->
<sec:intercept-url pattern="/capture-admin/agents/**" method="GET" access="ROLE_ADMIN, ROLE_CAPTURE_AGENT, ROLE_CAPTURE_AGENT_CALENDAR" />
<sec:intercept-url pattern="/capture-admin/**" access="ROLE_ADMIN, ROLE_CAPTURE_AGENT" />
```

Next, go to the Opencast REST Docs → `/user-utils` and fill out the form for
`POST /` with data like this:

- username: `ca-display`
- password: `secret-password`
- roles: `["ROLE_CAPTURE_AGENT_CALENDAR"]`

You should now be able to use this new user.
Loading