Skip to content

Commit

Permalink
Adding option to enable Log4j visualizer (ansible-ThoTeam#387)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Olivier Clavel <[email protected]>
  • Loading branch information
brianveltman and zeitounator authored Dec 15, 2023
1 parent 1fd793a commit 2a6888d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ _(Created with [gh-md-toc](https://github.com/ekalinin/github-markdown-toc))_
* [API access for this role](#api-access-for-this-role)
* [Branding capabalities](#branding-capabalities)
* [Audit capability](#audit-capability)
* [Log4j Visualizer](#log4j-visualizer)
* [Reverse proxy setup](#reverse-proxy-setup)
* [LDAP configuration](#ldap-configuration)
* [Privileges](#privileges)
Expand Down Expand Up @@ -310,6 +311,13 @@ Header and footer branding, those can contain HTML.

The [Auditing capability of nexus](https://help.sonatype.com/repomanager3/security/auditing) is off by default. You can turn it on by switching this to `true`. Please note that the audit data is stored in nexus db, persits accross reboots and is not automatically rotated/cleared.

### Log4j Visualizer
```yaml
nexus_log4j_visualizer_enabled: false
```

By default the log4j visualizer is set to false. You can enable this by switching to `true`. This will add the log4j-visualizer capability to your Nexus instance.

### Reverse proxy setup
```yaml
httpd_setup_enable: false
Expand Down Expand Up @@ -650,7 +658,6 @@ Configuring blobstore on S3 is provided as a convenience and is not part of the
# # negative_cache_enabled: true
# # negative_cache_ttl: 1440
# Content disposition is only supported for raw and maven2 proxies and can be set to attachment or inline. Inline is Nexus default, even when the property is not set explicitly.
# # content_disposition: inline
# To set HTTP request settings:
# # enable_circular_redirects: true
# # enable_cookies: true
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ nexus_docker_bearer_token_realm: false
# Enable/disable audit capability
nexus_audit_enabled: false

# Enable/disable log4j visualizer
nexus_log4j_visualizer_enabled: false

# email server
nexus_email_server_enabled: false
nexus_email_server_host: localhost
Expand Down
10 changes: 10 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@
capability_typeId: audit
capability_enabled: "{{ nexus_audit_enabled | bool }}"
capability_properties: {}

- name: Configure log4j-visualizer capability
ansible.builtin.include_tasks: call_script.yml
vars:
script_name: setup_capability
call_args:
capability_typeId: "log4j-visualizer"
capability_enabled: "{{ nexus_log4j_visualizer_enabled | bool }}"
capability_properties: {}

- name: Define backup task if backup is configured
ansible.builtin.set_fact:
_nexus_backup_task:
Expand Down

0 comments on commit 2a6888d

Please sign in to comment.