forked from wazuh/wazuh-docker
Compare commits
101
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3552e995c8 | ||
|
|
ddedb606f2 | ||
|
|
6c6c13b123 | ||
|
|
b76a033a97 | ||
|
|
581871d5bc | ||
|
|
c3d89f89dd | ||
|
|
c78520b135 | ||
|
|
3e63de99a8 | ||
|
|
37d96b5214 | ||
|
|
8c9945c111 | ||
|
|
925521d352 | ||
|
|
2028d866a1 | ||
|
|
4e098924e0 | ||
|
|
7f98075326 | ||
|
|
e9fec0e497 | ||
|
|
7042854bfa | ||
|
|
b63c294288 | ||
|
|
9df61de961 | ||
|
|
86ff04c0b3 | ||
|
|
0992111200 | ||
|
|
a1a27922de | ||
|
|
eba6bc6752 | ||
|
|
2df878f040 | ||
|
|
6f039f1de9 | ||
|
|
ebd416615e | ||
|
|
a00d16afcd | ||
|
|
6f2bf0cb3f | ||
|
|
4acc3b402b | ||
|
|
eba4fdf8eb | ||
|
|
1f825c13be | ||
|
|
3cfa63fc2e | ||
|
|
77b163bf10 | ||
|
|
2921d67de1 | ||
|
|
edb1c69294 | ||
|
|
9536ff5963 | ||
|
|
146dbff787 | ||
|
|
489bd01f36 | ||
|
|
54c5c643da | ||
|
|
63880eab51 | ||
|
|
fa55036943 | ||
|
|
6dab191255 | ||
|
|
7e9abfab60 | ||
|
|
183519e2d5 | ||
|
|
75e7f3df62 | ||
|
|
99ddc15cf6 | ||
|
|
c0a503bc81 | ||
|
|
966a3dcef7 | ||
|
|
9fc689206d | ||
|
|
9b329b095e | ||
|
|
f0ba8c3e63 | ||
|
|
edae7d3c6a | ||
|
|
af5db1efac | ||
|
|
14f0d6d622 | ||
|
|
cb60fc8b77 | ||
|
|
4f612e5426 | ||
|
|
90074777da | ||
|
|
320061f022 | ||
|
|
125f83e6df | ||
|
|
707fe87804 | ||
|
|
c9a43bd5ff | ||
|
|
26679d46f6 | ||
|
|
627e9517d8 | ||
|
|
ced83faef0 | ||
|
|
3b1814ec7b | ||
|
|
26d381b403 | ||
|
|
79f402ca2f | ||
|
|
d0ba0465fe | ||
|
|
5dbfa958b7 | ||
|
|
c13680e084 | ||
|
|
e2559957da | ||
|
|
6afb9d0779 | ||
|
|
6412cb90f9 | ||
|
|
bde4351a2a | ||
|
|
4f7ae19d81 | ||
|
|
d1f1e401b1 | ||
|
|
ea27c239b2 | ||
|
|
e437c1a4ec | ||
|
|
1f57ad6619 | ||
|
|
61a1385462 | ||
|
|
427b87d6e1 | ||
|
|
8615cd4d21 | ||
|
|
a4a64e66f4 | ||
|
|
a561deeaec | ||
|
|
9f710f90c3 | ||
|
|
4b054e88ca | ||
|
|
43da69277f | ||
|
|
17865358d8 | ||
|
|
95cb2fa3aa | ||
|
|
bba5b90716 | ||
|
|
afb1c1fba3 | ||
|
|
95b6b70a70 | ||
|
|
44a7a9b16f | ||
|
|
49f1b476b5 | ||
|
|
e83a092449 | ||
|
|
380ba92708 | ||
|
|
7e8e11bfd6 | ||
|
|
3c7d0f441d | ||
|
|
23fffddf95 | ||
|
|
88ec0fc043 | ||
|
|
774d14ee18 | ||
|
|
66f50039b0 |
@@ -150,7 +150,7 @@ ADMIN_PRIVILEGES=true # App privileges
|
||||
|
||||
* `4.0` branch on correspond to the latest Wazuh-Docker stable version.
|
||||
* `master` branch contains the latest code, be aware of possible bugs on this branch.
|
||||
* `Wazuh.Version_ElasticStack.Version` (for example 3.10.2_7.5.0) branch. This branch contains the current release referenced in Docker Hub. The container images are installed under the current version of this branch.
|
||||
* `Wazuh.Version_ElasticStack.Version` (for example 3.13.1_7.8.0) branch. This branch contains the current release referenced in Docker Hub. The container images are installed under the current version of this branch.
|
||||
|
||||
|
||||
## Compatibility Matrix
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
wazuh_url="${WAZUH_API_URL:-https://wazuh}"
|
||||
wazuh_port="${API_PORT:-55000}"
|
||||
api_username="${API_USERNAME:-wazuh}"
|
||||
api_password="${API_PASSWORD:-wazuh}"
|
||||
api_username="${API_USERNAME:-wazuh-wui}"
|
||||
api_password="${API_PASSWORD:-wazuh-wui}"
|
||||
|
||||
kibana_config_file="/usr/share/kibana/optimize/wazuh/config/wazuh.yml"
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import os
|
||||
sys.path.append(os.path.dirname(sys.argv[0]) + "/../framework")
|
||||
|
||||
USER_FILE_PATH = "/var/ossec/api/configuration/admin.json"
|
||||
SPECIAL_CHARS = "@$!%*?&-_"
|
||||
|
||||
|
||||
try:
|
||||
@@ -39,6 +40,26 @@ def db_roles():
|
||||
roles_result = get_roles()
|
||||
return {role["name"]: role["id"] for role in roles_result.affected_items}
|
||||
|
||||
def disable_user(uid):
|
||||
random_pass = "".join(
|
||||
random.choices(
|
||||
string.ascii_uppercase
|
||||
+ string.ascii_lowercase
|
||||
+ string.digits
|
||||
+ SPECIAL_CHARS,
|
||||
k=8,
|
||||
)
|
||||
)
|
||||
# assure there must be at least one character from each group
|
||||
random_pass = random_pass + ''.join([random.choice(chars) for chars in [string.ascii_lowercase, string.digits, string.ascii_uppercase, SPECIAL_CHARS]])
|
||||
random_pass = ''.join(random.sample(random_pass,len(random_pass)))
|
||||
update_user(
|
||||
user_id=[
|
||||
str(uid),
|
||||
],
|
||||
password=random_pass,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if not os.path.exists(USER_FILE_PATH):
|
||||
@@ -70,21 +91,7 @@ if __name__ == "__main__":
|
||||
],
|
||||
password=password,
|
||||
)
|
||||
# set a random password for all other users
|
||||
for name, id in initial_users.items():
|
||||
if name != username:
|
||||
random_pass = "".join(
|
||||
random.choices(
|
||||
string.ascii_uppercase
|
||||
+ string.ascii_lowercase
|
||||
+ string.digits
|
||||
+ "@$!%*?&-_",
|
||||
k=16,
|
||||
)
|
||||
)
|
||||
update_user(
|
||||
user_id=[
|
||||
str(id),
|
||||
],
|
||||
password=random_pass,
|
||||
)
|
||||
# disable unused default users
|
||||
for def_user in ['wazuh', 'wazuh-wui']:
|
||||
if def_user != username:
|
||||
disable_user(initial_users[def_user])
|
||||
|
||||
Reference in New Issue
Block a user