Skip to content

Commit

Permalink
removed redundant requirement, updated security docs, added dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed Jan 27, 2024
1 parent f2b9679 commit ecdc63a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.10-alpine

ARG AW_VERSION="0.0.5"

# BUILD CMD: docker build -t ansible-webui:0.0.4-dev --build-arg "AW_VERSION=0.0.4" .

# /ansible-webui can be used to mount an existing playbook-directory/-repo
RUN pip install --no-cache-dir --upgrade pip 2>/dev/null && \
pip install --no-cache-dir ansible-webui==${AW_VERSION} && \
mkdir -p /ansible-webui

WORKDIR /ansible-webui
EXPOSE 8000

CMD ["python3", "-m", "ansible-webui"]
13 changes: 7 additions & 6 deletions docs/source/usage/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ Security considerations this project does take into account:
These files are:

* ..created with mode 0600
* .. created with mode 0600

* ..overwritten and deleted at execution-cleanup
* .. overwritten and deleted at execution-cleanup

* Usage of GitHub's `dependabot <https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security#what-is-dependabot>`_ and `CodeQL <https://docs.github.com/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql>`_

Setup
*****
Expand All @@ -49,12 +50,12 @@ Setup

You should: (*example config will be added later on*)

* ..use HTTPS
* .. use HTTPS

* ..restrict the HTTP security headers (X-Frame-Options, X-Content-Type, Content-Security-Policy and Referrer-Policy, HSTS)
* .. restrict the HTTP security headers (X-Frame-Options, X-Content-Type, Content-Security-Policy and Referrer-Policy, HSTS)

* ..limit the networks able to access the Web-application using your firewall(s)
* .. limit the networks able to access the Web-application using your firewall(s)

* ..`limit the request rate <https://docs.nginx.com/nginx/admin-guide/security-controls/controlling-access-proxied-http/>`_ on the login form :code:`/a/*` and API :code:`/api/*`
* .. `limit the request rate <https://docs.nginx.com/nginx/admin-guide/security-controls/controlling-access-proxied-http/>`_ on the login form :code:`/a/*` and API :code:`/api/*`

* Make sure the Account passwords and API keys are kept/used safe
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ djangorestframework-api-key==2.*
drf-spectacular

## styles
django-bootstrap-v5
fontawesomefree

# scheduling
Expand Down
1 change: 0 additions & 1 deletion src/ansible-webui/aw/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
'rest_framework_api_key',
'drf_spectacular',
# styles
'bootstrap5',
'fontawesomefree',
]
MIDDLEWARE = [
Expand Down

0 comments on commit ecdc63a

Please sign in to comment.