8000 feat(config-api): initializing core documentStore manager timer for config-api by pujavs · Pull Request #9417 · JanssenProject/jans · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(config-api): initializing core documentStore manager timer for config-api #9417

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

Merged
merged 66 commits into from
Sep 9, 2024

Conversation

pujavs
Copy link
Contributor
@pujavs pujavs commented Sep 9, 2024

Prepare


Description

initializing core documentStore timer for deploying config-api assets

Target issue

closes #9403

Implementation Details


Test and Document the changes

  • Static code analysis has been run locally and issues have been fixed
  • Relevant unit and integration tests have been added/updated
  • Relevant documentation has been updated if any (i.e. user guides, installation and configuration guides, technical design docs etc)

Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with docs: to indicate documentation changes or if the below checklist is not selected.

  • I confirm that there is no impact on the docs due to the code changes in this PR.

pujavs added 30 commits August 5, 2024 13:15
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: pujavs <pujas.works@gmail.com>
Copy link
dryrunsecurity bot commented Sep 9, 2024

DryRun Security Summary

The provided code changes cover several updates across different components of the Jans Config API application, focusing on improving functionality and security, but requiring closer attention to ensure proper handling and securing of sensitive information and proper validation and sanitization of custom assets.

Expand for full summary

Summary:

The provided code changes cover several updates across different components of the Jans Config API application. Overall, the changes do not appear to introduce any significant security vulnerabilities, but there are a few areas that warrant closer attention from an application security perspective.

The changes to the Document class in the jans-core/document-store module involve the removal of the document field from the toString() method. While this change itself does not raise any immediate security concerns, it is important to ensure that the sensitive information contained in the Document class, such as the fileName, filePath, description, and document fields, is properly handled and secured throughout the application.

The changes to the AppInitializer class in the jans-config-api module involve the replacement of the AssetService class with the DocumentStoreManager class. This refactoring effort does not introduce any obvious security vulnerabilities, but it is important to review the implementation of the loadCustomAsset() method to ensure that the custom assets being loaded are properly validated and sanitized.

The changes to the AssetResource class in the jans-config-api module demonstrate a focus on improving the functionality and security of the asset management features. The code includes input validation, asset name conflict checks, secure file handling, authorization and access control, and robust error handling, all of which are positive security practices.

Finally, the updates to the Jans Config API Swagger documentation introduce new schemas and endpoints related to various features, such as attributes, authentication filters, app configuration, cache configuration, assets, properties, SMTP, organization, and plugins. While these changes do not directly introduce security vulnerabilities, it is important to review the implementation and configuration of these features to ensure that they are properly secured and do not introduce any new attack vectors.

Files Changed:

  1. jans-core/document-store/src/main/java/io/jans/service/document/store/model/Document.java: The changes involve removing the document field from the toString() method of the Document class. While this change does not have any significant security implications, it is important to ensure that the sensitive information contained in the Document class is properly handled and secured.

  2. jans-config-api/server/src/main/java/io/jans/configapi/configuration/AppInitializer.java: The changes involve replacing the AssetService class with the DocumentStoreManager class. This refactoring effort does not introduce any obvious security vulnerabilities, but the implementation of the loadCustomAsset() method should be reviewed to ensure that the custom assets being loaded are properly validated and sanitized.

  3. jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/AssetResource.java: The changes demonstrate a focus on improving the functionality and security of the asset management features, including input validation, asset name conflict checks, secure file handling, authorization and access control, and robust error handling.

  4. jans-config-api/docs/jans-config-api-swagger.yaml: The changes introduce new schemas and endpoints related to various features, such as attributes, authentication filters, app configuration, cache configuration, assets, properties, SMTP, organization, and plugins. While these changes do not directly introduce security vulnerabilities, it is important to review the implementation and configuration of these features to ensure that they are properly secured and do not introduce any new attack vectors.

Code Analysis

We ran 9 analyzers against 4 files and 1 analyzer had findings. 8 analyzers had no findings.

Analyzer Findings
Authn/Authz Analyzer 2 findings

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto mo-auto added comp-jans-config-api Component affected by issue or PR comp-jans-core Component affected by issue or PR kind-feature Issue or PR is a new feature request labels Sep 9, 2024
Copy link
sonarqubecloud bot commented Sep 9, 2024

Copy link
sonarqubecloud bot commented Sep 9, 2024

@yuriyz yuriyz enabled auto-merge (squash) September 9, 2024 11:27
Copy link
sonarqubecloud bot commented Sep 9, 2024

@yuriyz yuriyz merged commit 37bc45b into main Sep 9, 2024
7 of 8 checks passed
@yuriyz yuriyz deleted the jans-config-fix branch September 9, 2024 16:35
Copy link
sonarqubecloud bot commented Sep 9, 2024
A373

yuriyz pushed a commit that referenced this pull request Nov 7, 2024
…onfig-api (#9417)

* fix(config-api): asset mgt endpoint fixes

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset upload mgt ehancement and fido

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset upload mgt ehancement and fido

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset upload mgt ehancement and fido

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): asset upload

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): lock review comments

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock code review comments

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 delete functionality

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): acr validation

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): doc(config-api): IDP schema attribute descriptions #9187

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): uploading assets via API generates 2 entries #9178

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt, fido and IDP changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 device endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): resolved sonar review issues

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sonar review comment fix

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): swagger spec

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): saml config attribute description

Signed-off-by: pujavs <pujas.works@gmail.com>

* doc(config-api): added SAML attribute description

Signed-off-by: pujavs <pujas.works@gmail.com>

* doc(config-api): added SAML attribute description

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(jans-lock): code review comment fix isssue#9305

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(jans-lock): code review comment fix isssue#9305

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock review point

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(lock): code review comment

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(lock): code review comment

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock endpoint fixes and SAML IDP NPE

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset enhancement

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): implement timer for asset mgt to fetch and deploy assets forconfig-api #9403

Signed-off-by: pujavs <pujas.works@gmail.com>

---------

Signed-off-by: pujavs <pujas.works@gmail.com>
Former-commit-id: 37bc45b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-config-api Component affected by issue or PR comp-jans-core Component affected by issue or PR kind-feature Issue or PR is a new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(config-api): implement timer for asset mgt to fetch and deploy assets for config-api
5 participants
0