Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement token generation for authentication in Notification API #688

Open
8 tasks
Ahmed-Ghanam opened this issue Jan 10, 2025 · 2 comments
Open
8 tasks
Assignees

Comments

@Ahmed-Ghanam
Copy link
Contributor

Description

We want the Notifications API to securely access external APIs, such as the Register API, by using an access token. The access token will be used to authenticate and authorize requests to these APIs, ensuring secure and efficient communication.

The Notifications API should generate tokens dynamically when required and manage their lifecycle, including expiration and renewal.

Example

A sample request with an access token:

GET /register/api/v1/parties/nameslookup HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
    "ssn": "18874198354"
}

Additional Information

  • The access token should be a JSON Web Token (JWT) to ensure compatibility with standard authentication mechanisms.
  • Token generation must include support for claims and scopes, specifying what the token can access and for how long.
  • Follow industry standards for token encryption and signing (e.g., RSA256).

Refinement

  • Tokens should be cached for reuse to minimize unnecessary generation.
  • Ensure the system can handle token renewal seamlessly, avoiding downtime or failed requests.

Tasks

  • Implement token generation service
    • Include configurable settings for token expiration and signing algorithms
    • Add caching for generated tokens
  • Implement token validation logic to verify expiration and signature
  • Unit/integration tests
  • Documentation

Acceptance Criteria

  • Access tokens are successfully generated, validated, and cached.
  • Tokens are included in API requests for secure communication.
@Ahmed-Ghanam
Copy link
Contributor Author

This ticket builds upon the implementation provided in #545.

@Ahmed-Ghanam
Copy link
Contributor Author

The values.yaml file has been updated in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant