Skip to content

Add bearer token authorization check - #1912

Merged
rampage644 merged 2 commits into
mainfrom
jankaul/bearer-token-auth
Nov 8, 2025
Merged

Add bearer token authorization check#1912
rampage644 merged 2 commits into
mainfrom
jankaul/bearer-token-auth

Conversation

@JanKaul

@JanKaul JanKaul commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Summary

Add bearer token authorization for the Iceberg REST API endpoint. When configured, incoming requests are validated against the bearer token. Requests without proper authorization return 401 Unauthorized. If no token is configured, all requests are allowed through.

Changes

  • Add axum-auth dependency for middleware support
  • Implement require_auth middleware to validate Bearer tokens
  • Add bearer_token field to the Iceberg REST API state
  • Add iceberg_rest_bearer_token CLI option (supports ICEBERG_REST_BEARER_TOKEN env var)
  • Integrate auth middleware into the Iceberg REST router

@github-actions

github-actions Bot commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

SLT Targeted Testing: No relevant SLT tests found for the changes in this PR. No testing required.

@JanKaul
JanKaul force-pushed the jankaul/bearer-token-auth branch from c323d3d to c957d02 Compare November 7, 2025 10:48
@github-actions

github-actions Bot commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

SLT Targeted Testing: No relevant SLT tests found for the changes in this PR. No testing required.

@github-actions

github-actions Bot commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

SLT Targeted Testing: No relevant SLT tests found for the changes in this PR. No testing required.

@JanKaul
JanKaul marked this pull request as ready for review November 7, 2025 15:19

@DanCodedThis DanCodedThis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JanKaul How do you authorize? Or do you just send the token with each request manually, no log in? Otherwise, LGTM

@rampage644
rampage644 merged commit d104f8c into main Nov 8, 2025
7 checks passed
@rampage644
rampage644 deleted the jankaul/bearer-token-auth branch November 8, 2025 16:53
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.

3 participants