Skip to content

Improve the service registration form: require-auth checkbox and success feedback - #249

Merged
rbardaji merged 2 commits into
mainfrom
feature/service-require-auth-checkbox
Aug 17, 2026
Merged

Improve the service registration form: require-auth checkbox and success feedback#249
rbardaji merged 2 commits into
mainfrom
feature/service-require-auth-checkbox

Conversation

@rbardaji

@rbardaji rbardaji commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Closes #248

Two UI improvements to registering a service, found while testing it.

1. "Require authentication" checkbox

A service can require its callers to be authenticated (the Endpoint checks a requires_auth extra before forwarding through /services/redirect/...). The only way to set it from the UI was an Additional metadata pair with the exact key requires_auth — undiscoverable. The form now has a first-class Require authentication checkbox that sets extras.requires_auth = 'true'. The stored value is unchanged, so hand-protected and checkbox-protected services are identical.

2. Registering confirms and returns to Search

The Register button is at the bottom of a long form, and the success message rendered above it (off-screen), so a successful registration read as "nothing happened". Registration now navigates to Search with a one-off success banner (passed via router state, cleared from history), where the new service is listed.

Verified

  • Protection end-to-end on a CKAN + S3 Endpoint: a service with requires_auth returns 401 on /services/redirect/<name> without a token; an open service returns 200.
  • UI compiles cleanly (react-scripts build, CI=true); both changes served in the bundle.

Raul Bardaji added 2 commits August 17, 2026 07:31
A service can require its callers to be authenticated, stored as the extra
requires_auth, but the only way to set it from the UI was to add an
Additional metadata pair with that exact key — undiscoverable without
knowing the internals.

Add a labelled checkbox that sets extras.requires_auth = 'true' when
ticked. The checkbox is authoritative for that extra; the free-form
metadata section stays for everything else. Stored value is unchanged, so
services protected by hand and through the checkbox are identical.

Closes #248
The Register button sits at the bottom of a long form, and the success
message rendered above it, off-screen, so a successful registration looked
like nothing happened. On success, navigate to Search with a one-off
success banner (handed over via router state and cleared from history), so
the user gets clear feedback and lands where the new service is listed.

Removes the now-unused inline success alert from the service form.
@rbardaji rbardaji changed the title Add a Require authentication checkbox to the service form Improve the service registration form: require-auth checkbox and success feedback Aug 17, 2026
@rbardaji
rbardaji merged commit d171254 into main Aug 17, 2026
1 check passed
@rbardaji
rbardaji deleted the feature/service-require-auth-checkbox branch August 17, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protecting a service in the UI requires knowing a hidden metadata key

1 participant