Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soctools-user-mgmt-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gn4-3-wp8-t3.1 SOC
soctools-user-mgmt-ui
Commits
266a71cb
Commit
266a71cb
authored
2 years ago
by
Václav Bartoš
Browse files
Options
Downloads
Patches
Plain Diff
Added a note about OSD on main page + updated TODOs in code
parent
5ddb0912
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config.py
+0
-4
0 additions, 4 deletions
config.py
main.py
+4
-15
4 additions, 15 deletions
main.py
templates/main.html
+4
-0
4 additions, 0 deletions
templates/main.html
with
8 additions
and
19 deletions
config.py
+
0
−
4
View file @
266a71cb
...
@@ -19,10 +19,6 @@ CORTEX_API_KEY_FILE = os.path.join(SOCTOOLS_BASE, "secrets/tokens/cortex_secret_
...
@@ -19,10 +19,6 @@ CORTEX_API_KEY_FILE = os.path.join(SOCTOOLS_BASE, "secrets/tokens/cortex_secret_
MGMT_USER_NAME
=
"
soctools-user-mgmt
"
MGMT_USER_NAME
=
"
soctools-user-mgmt
"
MGMT_USER_CERT_PATH
=
os
.
path
.
join
(
SOCTOOLS_BASE
,
"
secrets/CA/issued/soctools-user-mgmt.crt
"
)
MGMT_USER_CERT_PATH
=
os
.
path
.
join
(
SOCTOOLS_BASE
,
"
secrets/CA/issued/soctools-user-mgmt.crt
"
)
MGMT_USER_KEY_PATH
=
os
.
path
.
join
(
SOCTOOLS_BASE
,
"
secrets/CA/private/soctools-user-mgmt.key
"
)
MGMT_USER_KEY_PATH
=
os
.
path
.
join
(
SOCTOOLS_BASE
,
"
secrets/CA/private/soctools-user-mgmt.key
"
)
# TODO FIXME "SOC_Admin" used instead for initial testing
# MGMT_USER_NAME = "SOC_Admin"
# MGMT_USER_CERT_PATH = os.path.join(SOCTOOLS_BASE, "secrets/certificates/SOC_Admin.crt.pem")
# MGMT_USER_KEY_PATH = os.path.join(SOCTOOLS_BASE, "secrets/certificates/SOC_Admin.key.pem")
# Following parameters are set up dynamically by load_config() in main.py
# Following parameters are set up dynamically by load_config() in main.py
SOCTOOLSPROXY
=
None
SOCTOOLSPROXY
=
None
...
...
This diff is collapsed.
Click to expand it.
main.py
+
4
−
15
View file @
266a71cb
...
@@ -20,7 +20,7 @@ from thehive import *
...
@@ -20,7 +20,7 @@ from thehive import *
from
cortex
import
*
from
cortex
import
*
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
app
.
secret_key
=
"
ASDF1234 - CHANGE ME!
"
app
.
secret_key
=
"
ASDF1234 - CHANGE ME!
"
# TODO: set dynamically to something random
@app.before_first_request
@app.before_first_request
...
@@ -638,11 +638,9 @@ def _send_token(username: str, email: str) -> Tuple[bool, Optional[str]]:
...
@@ -638,11 +638,9 @@ def _send_token(username: str, email: str) -> Tuple[bool, Optional[str]]:
# TODO:
# TODO:
# (re)send cert-access token for existing user - DONE (on click in table)
# - revoke and delete certificate when user is deleted
# automatically create certificate when creating new user (optionally automatically send email with token) - DONE
# - send tokens via email
# revoke and delete certificate when user is deleted
# - authentication/authorization to this GUI
# make CN=username (so cert filename also matches the username (it's stored by CN)) - DONE
# @app.route("/test_cert/<func>")
# @app.route("/test_cert/<func>")
# def test_cert_endpoint(func):
# def test_cert_endpoint(func):
...
@@ -650,15 +648,6 @@ def _send_token(username: str, email: str) -> Tuple[bool, Optional[str]]:
...
@@ -650,15 +648,6 @@ def _send_token(username: str, email: str) -> Tuple[bool, Optional[str]]:
# result = str(getattr(certificates, func)(**request.args))
# result = str(getattr(certificates, func)(**request.args))
# return make_response(result)
# return make_response(result)
# TODO other services (besides Keycloak)
# - NiFi - DONE
# - MISP - DONE
# - Kibana? - account doesn't need to be added, but it needs to add privileges
# - TheHive + Cortex
# TODO authentication/authorization to this GUI
# When the script is run directly, run the application on a local development server.
# When the script is run directly, run the application on a local development server.
# Optionally pass two parameters, 'host' (IP to listen on) and 'port',
# Optionally pass two parameters, 'host' (IP to listen on) and 'port',
# e.g.: ./main.py 0.0.0.0 8080
# e.g.: ./main.py 0.0.0.0 8080
...
...
This diff is collapsed.
Click to expand it.
templates/main.html
+
4
−
0
View file @
266a71cb
...
@@ -107,4 +107,8 @@ document.getElementById('show-internal').addEventListener('change', function(eve
...
@@ -107,4 +107,8 @@ document.getElementById('show-internal').addEventListener('change', function(eve
{% endfor %}
{% endfor %}
</table>
</table>
<h3>
OpenSearch Dashboards
</h3>
OpenSearch Dashboards does not keep a list of users, it is currently configured to allow (full) access to any user authenticated by Keycloak (i.e. those listed in the first table).
{% endblock %}
{% endblock %}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment