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

fix(jans-cli-tui): asset issues #9441

Merged
merged 8 commits into from
Sep 11, 2024
Merged

Conversation

devrimyatar
Copy link
Contributor

@devrimyatar devrimyatar commented Sep 10, 2024

closes #9429
closes #9376

  • Relevant documentation has been updated if any (i.e. user guides, installation and configuration guides, technical design docs etc)

Signed-off-by: Mustafa Baser <mbaser@mail.com>
@devrimyatar devrimyatar added kind-bug Issue or PR is a bug in existing functionality comp-jans-cli-tui Component affected by issue or PR labels Sep 10, 2024
@devrimyatar devrimyatar marked this pull request as draft September 10, 2024 10:05
Copy link

dryrunsecurity bot commented Sep 10, 2024

DryRun Security Summary

The pull request updates the "Assets" plugin in the Jans CLI TUI application, improves error handling, and provides documentation for securely managing custom assets on the Janssen Server.

Expand for full summary

Summary:

The code changes in this pull request focus on updating the "Assets" plugin in the Jans CLI TUI (Text-based User Interface) application and providing documentation for managing custom assets on the Janssen Server. The key changes include updating the display name column to show the file name, modifying the asset saving logic, and improving error handling. From an application security perspective, the changes do not appear to introduce any obvious security vulnerabilities, but it's important to ensure that proper input validation, error handling, and security best practices are followed throughout the application. Additionally, the documentation updates related to custom assets management on the Janssen Server highlight the importance of secure implementation, including proper access controls, input validation, and handling of sensitive information.

Files Changed:

  1. jans-cli-tui/cli_tui/plugins/130_assets/main.py:

    • The header for the "Display Name" column in the assets list has been changed to "File Name".
    • The logic for saving a new or edited asset has been updated, including changes to the "assetFile" field, "service" field, and the "operation_id" for saving new and editing existing assets.
    • The error handling has been improved, with error messages displayed when the user tries to save an asset without providing a file name and description, or if the asset deletion is not completed successfully.
  2. docs/admin/config-guide/custom-assets-configuration.md:

    • The documentation has been updated to provide guidance on managing custom assets using the Janssen Server CLI, TUI, and REST API.
    • The property names have been updated from "displayName" to "fileName" for various asset objects.
    • The code samples demonstrate how to perform various operations on custom assets, such as fetching, adding, updating, and deleting.
    • The documentation highlights the importance of secure implementation, including proper access controls, input validation, and handling of sensitive information related to custom assets.

Code Analysis

We ran 9 analyzers against 4 files and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto mo-auto added the area-documentation Documentation needs to change as part of issue or PR label Sep 10, 2024
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
@devrimyatar devrimyatar marked this pull request as ready for review September 10, 2024 12:11
@yuriyz yuriyz enabled auto-merge (squash) September 11, 2024 12:10
@yuriyz yuriyz merged commit b6722b5 into main Sep 11, 2024
1 of 2 checks passed
@yuriyz yuriyz deleted the jans-cli-tui-asset-displayname-9429 branch September 11, 2024 12:10
Copy link

Copy link

Copy link

yuriyz pushed a commit that referenced this pull request Nov 7, 2024
* fix(jans-cli-tui): asset fileName

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* fix(jans-cli-tui): don't ask file name when editing asset

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* docs(jans-cli-tui): update assets docs

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* fix(jans-cli-tui): allow re-upload asset when edtiting

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* fix(jans-cli-tui): asset service

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* fix(jans-cli-tui): focus if deletation error popup raises in asset

Signed-off-by: Mustafa Baser <mbaser@mail.com>

---------

Signed-off-by: Mustafa Baser <mbaser@mail.com>
Former-commit-id: b6722b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Documentation needs to change as part of issue or PR comp-jans-cli-tui Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(jans-cli-tui): displayName for assets fix(jans-cli-tui): edit asset not working
5 participants