Skip to content

Commit 5cae051

Browse files
committed
Rename test configs to avoid .gitignore
1 parent c35b8b9 commit 5cae051

15 files changed

+223
-86
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@ For more details see:
3333
To install the RPI ws281x library:
3434

3535
pip3 install rpi_ws281x
36-
36+
3737
To install the Argon hash algorithm
3838

3939
sudo apt install python3-argon2
4040

4141
To install the Flask CSRF protection
42+
4243
pip3 install Flask-WTF
43-
44-
To be able to run the tests
44+
45+
To be able to run the tests
46+
4547
sudo apt install python3-pytest
4648

4749

@@ -72,9 +74,9 @@ For more information see: [Penguin Tutor guide to starting programs automaticall
7274

7375
# Security
7476

75-
The pixel server is designed to support varying levels of security depending upon your system requirements.
77+
The pixel server is designed to support varying levels of security depending upon your system requirements.
7678

77-
If used on a private only network then it can be configured for network address authentication.
79+
If used on a private only network then it can be configured for network address authentication.
7880

7981
If allowing incoming connections from the Internet then it is recommended that user authentication is enabled and it is configured through SSL. The configuration below is based on using Nginx as a reverse proxy to provide HTTPS using a LetsEncrypt certificate.
8082

@@ -103,7 +105,7 @@ ln -s to /etc/nginx/sites-enabled
103105

104106

105107
Add the following in a location file (this assumes using /rpi1/ as the route
106-
for this particular server.
108+
for this particular server.
107109

108110
location /rpi1/ {
109111
proxy_set_header X-Real-IP $remote_addr;
@@ -208,7 +210,7 @@ SK6812W_STRIP
208210
Controls authentication. Can have one or more of the following, which can be a single IP address, or a network subnet, multiple addresses or network subnets (comma seperated) or 0.0.0.0 (all addresses)
209211
Multiple entries will be appended to the access.
210212

211-
proxy_server =
213+
proxy_server =
212214
Any addresses in this range will be treated as proxy servers.
213215
If the proxy server has X-Real-IP set then that will be used instead of the local ip address of the server. Warning if that is not a proxy server then this
214216
could be a security risk (in terms of allowing non authenticated logins). Cannot be 0.0.0.0 (everywhere is a proxy doesn't make sense) - normally this will be specific IP address rather than range.
@@ -265,4 +267,4 @@ If upgrading from a version prior to July 2022 then you may need to create a new
265267
Currently supports limited automated testing based around the authentication. This is achieved using:
266268
py.test-3
267269

268-
Manual testing is required for all other functions.
270+
Manual testing is required for all other functions.

tests/configs/auth_test.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Authentication rules for Pixel Server
2+
# Following addresses can access without authentication
3+
network_allow_always = 127.0.0.1
4+
# Following allowed, but need to authenticate
5+
# 0.0.0.0 = all addresses
6+
network_allow_auth = 0.0.0.0

tests/configs/customlight_test.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#008000

tests/configs/pixelserver_test.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Configuration file for pixel-server
2+
# Overrides entries in defaults.cfg
3+
4+
ledcount=44
5+
gpiopin=18
6+
ledfreq=800000
7+
leddma=5
8+
ledmaxbrightness=50
9+
ledinvert=False
10+
ledchannel=0
11+
striptype=GRB
12+
algorithm=Argon2

tests/configs/users_test.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
admin:$argon2id$v=19$m=102400,t=2,p=8$0ZzMvxnNwvxePMp+y7hpfA$rCupS+lnWHUdEeIVkUHAGQ:Admin user:admin::
2+
stduser1:$argon2id$v=19$m=102400,t=2,p=8$QHpYDjnCGTsoxbRbxST34w$AW5TCq3vw4S+NujD8EUH9Q::standard::
3+
adminuser1:$5$1883d31e1d394719b2eab0b9b2c786bc$743be7524ea18ca3fbc53333d0cec4cfd20e115045ddb455f30d1bcf3df2621d:Admin user real name:admin:user@example938.com:Admin user sha256
4+
stduser2:$5$1948a2047f5743c4a64bde92919d3eec$25670be86447039a5e126fc8acaac5e4ee4bd7805fcb493074ea9877be03088c:Standard user real name:standard:stduser2@nouser.ex543.com:Standard user sha256

0 commit comments

Comments
 (0)