Skip to content

feat: Shifted thhe manual creation of license to the automated creation#3854

Open
devlopharsh wants to merge 1 commit intoeclipse-sw360:mainfrom
devlopharsh:feat/automated-license-creator
Open

feat: Shifted thhe manual creation of license to the automated creation#3854
devlopharsh wants to merge 1 commit intoeclipse-sw360:mainfrom
devlopharsh:feat/automated-license-creator

Conversation

@devlopharsh
Copy link
Contributor

fixes: #3842

Summary

  • Added config flag license.manual.creation.enabled (default false) to control manual license creation.
  • Blocked manual creation and implicit auto-creation when disabled, with clear LicenseDB sync message.
  • Added deprecation warning header on create responses.
  • Updated REST docs and tests to match new behavior.

Configuration :

  • Added new key : license.manual.creation.enabled .
  • kept the manual creation false at defaullt.

Testing :

mvn -Dbase.deploy.dir="d:\open\sw-360\sw360\target\deploy" -pl rest/resource-server -am test -Dtest=LicenseSpecTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -Dbase.deploy.dir="d:\open\sw-360\sw360\target\deploy" -pl rest/resource-server -am test -Dtest=LicenseTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -Dbase.deploy.dir="d:\open\sw-360\sw360\target\deploy" -pl libraries/datahandler -am test -Dsurefire.failIfNoSpecifiedTests=false

checks :

  • Config flag added with default/validation
  • REST endpoints respect flag
  • Deprecation warning added
  • Docs updated
  • Tests updated and passing

@devlopharsh
Copy link
Contributor Author

@GMishx @ADITYA-CODE-SOURCE
i have to discuss some changes also regarding the PR as :

  1. UI update : we also need to Hide/disable Create License and show Use LicenseDB sync message when manual creation is disabled.
  2. Client integrations : Any scripts or integrations calling POST /api/licenses will now receive 403 by default unless license.manual.creation.enabled=true.

Please have a review over the pr and let me know about further changes needed .

@ADITYA-CODE-SOURCE
Copy link
Contributor

@GMishx @ADITYA-CODE-SOURCE i have to discuss some changes also regarding the PR as :

  1. UI update : we also need to Hide/disable Create License and show Use LicenseDB sync message when manual creation is disabled.
  2. Client integrations : Any scripts or integrations calling POST /api/licenses will now receive 403 by default unless license.manual.creation.enabled=true.

Please have a review over the pr and let me know about further changes needed .

Thanks for the PR @devlopharsh. A few concerns:

  1. Breaking change: Default false will break all existing license creation workflows. Should default to true.
  2. Missing dependency: This PR references "sync from LicenseDB" but that endpoint (/api/license-db/sync) only exists after PR feat(config): Add LicenseDB connection configuration properties #3686 is merged. The message will confuse users on current main.
  3. Suggestion:
    • Change default to true
    • Make the error message conditional: if LicenseDB is enabled, show sync message; otherwise show generic message
    • Or wait for PR feat(config): Add LicenseDB connection configuration properties #3686 to merge first
      Also, the PR title says "automated license creator" but the implementation disables manual creation - consider renaming for clarity.

@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Deprecate manual license creation and use LicenseDB as source

3 participants