-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from klementng/dev
Merge codebase rewrite
- Loading branch information
Showing
34 changed files
with
1,603 additions
and
1,155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,107 @@ | ||
# This is the default configuration file generated on first run | ||
# Restart the server / docker container after making changes to this file | ||
|
||
settings: | ||
server: | ||
host: '0.0.0.0' #listening ip address | ||
port: 9999 #listening port | ||
host: "0.0.0.0" | ||
port: 9999 | ||
|
||
modules: | ||
|
||
/auth: #i.e. http://localhost:9999/auth or http://localhost:9999/ | ||
mode: local # use local database | ||
|
||
# http authentication parameters | ||
/auth: #i.e. http://localhost:9999/auth | ||
mode: local | ||
|
||
method: basic | ||
realm: default users | ||
|
||
local: | ||
db_path: /config/users.yml | ||
allowed_roles: | ||
- default | ||
|
||
/auth/admin: #i.e. http://localhost:9999/auth/admin | ||
mode: local | ||
|
||
method: basic | ||
realm: admin users | ||
|
||
# restrict login to the following usernames: | ||
users: | ||
local: | ||
db_path: /config/users.yml | ||
allowed_roles: | ||
- admin | ||
|
||
/auth/local: #i.e. http://localhost:9999/auth | ||
mode: local | ||
|
||
method: basic | ||
realm: default users | ||
|
||
local: | ||
db_path: /config/users.yml | ||
allowed_roles: | ||
- default | ||
|
||
|
||
/auth/upstream: #i.e. http://localhost:9999/auth/upstream | ||
mode: upstream # do the password checking upstream | ||
mode: upstream # do the password checking in upstream | ||
|
||
method: basic | ||
realm: upstream users | ||
forward_request_headers: false | ||
|
||
upstream: | ||
# kwargs as follows requests.request() see: https://requests.readthedocs.io/en/latest/api/ | ||
# allow_redirects is set to false by default | ||
|
||
# <<username>> / <<password>> are replaced with user inputs | ||
|
||
method: POST | ||
url: https://www.example.com/authenticate | ||
url: https://demo.jellyfin.org/stable/Users/authenticatebyname | ||
data: >- | ||
{"Username":"<<username>>","Password":"<<password>>"} | ||
{"Username":"<<username>>","Pw":"<<password>>"} | ||
# json: | ||
# Username: <<username>> | ||
# Pw: <<password>> | ||
headers: | ||
Content-Type: application/json | ||
X-Emby-Authorization: MediaBrowser Client="nginx", Device="server", DeviceId="0", Version="1.0.0" | ||
|
||
# Forward the following list of request header to upstream server | ||
forward_request_headers_list: | ||
- X-Forwarded-For | ||
- X-Forwarded-Host | ||
- X-Forwarded-Method | ||
- X-Forwarded-Port | ||
- X-Forwarded-Proto | ||
- X-Forwarded-Server | ||
- X-Forwarded-Ss | ||
- X-Forwarded-Uri | ||
- X-Original-Method | ||
- X-Original-URL | ||
- X-Real-IP | ||
|
||
# json: | ||
# Username: <<username>> | ||
# Password: <<password>> | ||
|
||
users: | ||
- demo | ||
|
||
/auth/dynamic: #i.e. http://localhost:9999/auth/dynamic | ||
|
||
mode: dynamic # check upstream first if fails check local | ||
__forward: | ||
- X-Forwarded-For | ||
- X-Forwarded-Host | ||
- X-Forwarded-Method | ||
- X-Forwarded-Port | ||
- X-Forwarded-Proto | ||
- X-Forwarded-Server | ||
- X-Forwarded-Ss | ||
- X-Forwarded-Uri | ||
- X-Original-Method | ||
- X-Original-URL | ||
- X-Real-IP | ||
|
||
/auth/dynamic: #i.e. http://localhost:9999/auth/upstream | ||
mode: dynamic # do the password checking in upstream | ||
|
||
method: basic | ||
realm: upstream users | ||
realm: dynamic users | ||
|
||
upstream: | ||
# kwargs as follows requests.request() see: https://requests.readthedocs.io/en/latest/api/ | ||
# allow_redirects is set to false by default | ||
|
||
# <<username>> / <<password>> are replaced with user inputs | ||
local: | ||
db_path: /config/users.yml | ||
allowed_roles: | ||
- admin | ||
- default | ||
|
||
method: POST | ||
url: https://www.example.com/authenticate | ||
upstream: | ||
url: https://demo.jellyfin.org/stable/Users/authenticatebyname | ||
data: >- | ||
{"Username":"<<username>>","Password":"<<password>>"} | ||
headers: | ||
Content-Type: application/json | ||
|
||
{"Username":"<<username>>","Pw":"<<password>>"} | ||
# json: | ||
# Username: <<username>> | ||
# Password: <<password>> | ||
|
||
users: | ||
- admin | ||
- | ||
users: | ||
# supported password format | ||
# text:plaintext_password | ||
# algo:iterations:b64(hash) | ||
# algo:iterations:b64(salt):b64(hash) | ||
|
||
#user1: text:password | ||
user: sha256:10000:///////////////////////abc==:8WR8KTAo2P0y9bRMkasWdKxpdBupkNBSLU4X6vz+bSg= | ||
admin: sha256:10000:abcdefghijklmnopQRSTUVWXYZ==:UuRV7et/zfAIWowdZswGbCBfArhIheeeVmAXBw7OsWo= | ||
# Pw: <<password>> | ||
headers: | ||
Content-Type: application/json | ||
X-Emby-Authorization: MediaBrowser Client="nginx", Device="server", DeviceId="0", Version="1.0.0" | ||
|
||
# Forward the following list of request header to upstream server | ||
__forward: | ||
- X-Forwarded-For | ||
- X-Forwarded-Host | ||
- X-Forwarded-Method | ||
- X-Forwarded-Port | ||
- X-Forwarded-Proto | ||
- X-Forwarded-Server | ||
- X-Forwarded-Ss | ||
- X-Forwarded-Uri | ||
- X-Original-Method | ||
- X-Original-URL | ||
- X-Real-IP |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.