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

Update /c/{customerId}/{clusterId} Endpoint to Validate customerId in dotCMS Configurator #31352

Open
3 tasks
victoralfaro-dotcms opened this issue Feb 12, 2025 · 0 comments

Comments

@victoralfaro-dotcms
Copy link
Contributor

victoralfaro-dotcms commented Feb 12, 2025

User Story

As a Java developer, I want to change the dotCMS configurator from the https://github.com/dotCMS/internal-infrastructure repo to update the /c/{customerId}/{clusterId} endpoint to consider not only the clusterId field but also the customerId, ensuring that keys are correctly assigned to the right customers.

Acceptance Criteria

  • The /c/{customerId}/{clusterId} endpoint logic is updated to check both customerId and clusterId.
  • A new method is added to ApiKeyPanacheRepository to look up an entity by clusterId and customerId.
  • If no matching entity is found, a new key is created.
  • If a matching entity exists, it returns the correct key based on both customerId and clusterId.
  • Tests are written to cover all possible scenarios.
  • Documentation is updated accordingly.

dotCMS Version

main

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

to_define

Assumptions & Initiation Needs

  • The current implementation only considers clusterId, leading to key mismatches.
  • The ApiKeyPanacheRepository supports adding a new lookup method.
  • No major architectural changes are needed to implement this fix.

Quality Assurance Notes & Workarounds

  • Ensure unit and integration tests validate the new logic.
  • Verify that no performance degradation occurs due to the additional lookup parameter.

Sub-Tasks & Estimates

  • Implement new lookup method in ApiKeyPanacheRepository (6h)
  • Update /c/{customerId}/{clusterId} endpoint logic (6h)
  • Final review and approval (2h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Next 1-3 Sprints
Development

No branches or pull requests

1 participant