Skip to content

docs(guides): add authentication layer guide for object storage with …#2209

Open
GabrielAzion wants to merge 1 commit into
mainfrom
EDU-4757-guide-auth-layer
Open

docs(guides): add authentication layer guide for object storage with …#2209
GabrielAzion wants to merge 1 commit into
mainfrom
EDU-4757-guide-auth-layer

Conversation

@GabrielAzion

@GabrielAzion GabrielAzion commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

…functions

Add comprehensive guide for implementing JWT-based authentication to control access to Object Storage buckets using Azion Functions. Includes both English and Portuguese (Brazilian) versions covering:

  • Function implementation with JWT token validation
  • Token extraction from Authorization headers and cookies
  • Object retrieval from Object Storage after authentication
  • Advanced configurations for role-based access control and rate limiting
  • Testing instructions with curl examples

Related issue: EDU-4757

I've created a comprehensive guide for implementing an authentication layer for Object Storage using Functions, in both English and Portuguese.

Files created

English version:
src/content/docs/en/pages/guides/edge-storage/auth-layer-object-storage-functions/index.mdx

Portuguese version:
src/content/docs/pt-br/pages/guias/edge-storage/camada-autenticacao-object-storage-functions/index.mdx

Guide structure

The guide follows the Diátaxis framework and includes:

  1. How it works - Explains the authentication flow between users, Functions, and Object Storage
  2. Requirements - Lists prerequisites including Azion CLI, Node.js, and JWT secret
  3. Implementation steps:
    • Create a new Function project
    • Install the jose library for JWT verification
    • Complete code example with token extraction from headers/cookies
    • Environment variable configuration
    • Deploy instructions
  4. Creating an Application - How to configure the Application and Rules Engine
  5. Testing - JWT token generation and curl examples
  6. Advanced configurations:
    • Role-based access control
    • Rate limiting per user with KV Store
    • Object metadata for access control
  7. Related resources - Links to Object Storage API, Functions overview, and JWT integration

Key features of the implementation

  • JWT validation using the jose library
  • Token extraction from both Authorization header and cookies
  • Object retrieval using the azion:storage API
  • Proper error handling with appropriate HTTP status codes
  • Security best practices (secrets management via azion secrets put)
  • Extensible architecture for RBAC and rate limiting

…functions

Add comprehensive guide for implementing JWT-based authentication to control access to Object Storage buckets using Azion Functions. Includes both English and Portuguese (Brazilian) versions covering:

- Function implementation with JWT token validation
- Token extraction from Authorization headers and cookies
- Object retrieval from Object Storage after authentication
- Advanced configurations for role-based access control and rate limiting
- Testing instructions with curl examples
@GabrielAzion GabrielAzion requested a review from a team as a code owner June 25, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant