Skip to content

Add Bearer API key authentication for MDS endpoints#91

Open
kaysiz wants to merge 2 commits into
masterfrom
ks-api-keys
Open

Add Bearer API key authentication for MDS endpoints#91
kaysiz wants to merge 2 commits into
masterfrom
ks-api-keys

Conversation

@kaysiz

@kaysiz kaysiz commented Jul 6, 2026

Copy link
Copy Markdown
Member

Purpose

Add Bearer API key authentication for MDS endpoints

closes: Add github issue that originated this PR

Approach

Add Bearer API key authentication for MDS endpoints

Accept Authorization: Bearer tokens alongside Basic auth on DOI, media,
and metadata routes, and forward credentials to the DataCite API via Maremma.

Extract shared auth logic into ApiAuthenticatable to centralize Maremma
credential handling, client relationships for Basic auth, and missing-auth
responses. Add WebMock and request specs to verify bearer tokens are accepted
and forwarded.

Open Questions and Pre-Merge TODOs

Learning

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

Accept Authorization: Bearer tokens alongside Basic auth on DOI, media,
and metadata routes, and forward credentials to the DataCite API via Maremma.

Extract shared auth logic into ApiAuthenticatable to centralize Maremma
credential handling, client relationships for Basic auth, and missing-auth
responses. Add WebMock and request specs to verify bearer tokens are accepted
and forwarded.
@kaysiz kaysiz self-assigned this Jul 6, 2026
@kaysiz kaysiz requested review from a team and codycooperross July 6, 2026 08:33
Align with lupo API key authentication by allowing requests where the
API key is sent as the Basic username with no password (e.g. curl
--user DC.xxx:). Forward credentials to the DataCite API and omit client
relationships when the username is an API key.
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.

1 participant