Skip to content

When listening to server-sent events, regularly reload token from tokenfile #62

@onnozweers

Description

@onnozweers

Ada has two commands that listen to server-sent events. These are operations that may last a few days. For instance, Ada listens for files that are restored from tape, and when they become online, compute jobs may be started.

Normally, dCache checks tokens only at the start of an operation. However, Ada may need to follow server-sent-events with more than one operation. In the help text for --events:

	      When --recursive is added, all subdirectories will be
	      followed as well, including any new subdirectories
	      that will be created.

For adding new subdirectories to the event channel, Ada needs to make separate API calls. At that moment, a valid token is needed.

OIDC tokens usually live for 1 hour. Ada should re-read tokens from the specified tokenfile. Then, a user can repeatedly run oidc-token and save the token in the tokenfile, to provide Ada with the necessary authorization to continue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions