Skip to content

Commit

Permalink
update authentication docs to match parsing code
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 8, 2024
1 parent c454551 commit 39527ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/Network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ xdg-open http://localhost:10000/

```shell
echo -n thepassword > password.txt
xpra start --start=xterm --bind-ssh=0.0.0.0:10000,auth=file:filename=password.txt
xpra start --start=xterm --bind-ssh=0.0.0.0:10000,auth=file,filename=password.txt
```
```shell
xpra attach ssh://localhost:10000/
Expand Down
14 changes: 7 additions & 7 deletions docs/Usage/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Starting with version 4.0, the preferred way of specifying authentication is wit
ie for starting a [seamless](Seamless.md) server with a `TCP` socket protected by a password stored in a `file`:
```shell
xpra start --start=xterm -d auth
--bind-tcp=0.0.0.0:10000,auth=file:filename=password.txt
--bind-tcp=0.0.0.0:10000,auth=file,filename=password.txt
```
So that multiple sockets can use different authentication modules, and those modules can more easily be chained:
```shell
xpra start --start=xterm -d auth \
--bind-tcp=0.0.0.0:10000,auth=hosts,auth=file:filename=password.txt \
--bind-tcp=0.0.0.0:10000,auth=hosts,auth=file,filename=password.txt \
--bind-tcp=0.0.0.0:10001,auth=sys
```

Expand All @@ -40,7 +40,7 @@ Some of these modules require extra [dependencies](../Build/Dependencies.md).
| [fail](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/fail.py) | always fails authentication, no password required | useful for testing |
| [reject](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/reject.py) | always fails authentication, pretends to ask for a password | useful for testing |
| [env](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/env.py) | matches against an environment variable (`XPRA_PASSWORD` by default) | alternative to file module |
| [password](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/password.py) | matches against a password given as a module option, ie: `auth=password:value=mysecret` | alternative to file module |
| [password](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/password.py) | matches against a password given as a module option, ie: `auth=password,value=mysecret` | alternative to file module |
| [multifile](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/multifile.py) | matches usernames and passwords against an authentication file | proxy: see password-file below |
| [file](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/file.py) | compares the password against the contents of a password file, see password-file below | simple password authentication |
| [pam](https://github.com/Xpra-org/xpra/blob/master/xpra/server/auth/pam.py) | linux PAM authentication | Linux system authentication |
Expand All @@ -64,10 +64,10 @@ Some of these modules require extra [dependencies](../Build/Dependencies.md).
<summary>more examples</summary>

* `XPRA_PASSWORD=mysecret xpra start --bind-tcp=0.0.0.0:10000,auth=env`
* `SOME_OTHER_ENV_VAR_NAME=mysecret xpra start --bind-tcp=0.0.0.0:10000,auth=env:name=SOME_OTHER_ENV_VAR_NAME`
* `xpra start --bind-tcp=0.0.0.0:10000,auth=password:value=mysecret`
* `xpra start --bind-tcp=0.0.0.0:10000,auth=file:filename=/path/to/mypasswordfile.txt`
* `xpra start --bind-tcp=0.0.0.0:10000,auth=sqlite:filename=/path/to/userlist.sdb`
* `SOME_OTHER_ENV_VAR_NAME=mysecret xpra start --bind-tcp=0.0.0.0:10000,auth=env,name=SOME_OTHER_ENV_VAR_NAME`
* `xpra start --bind-tcp=0.0.0.0:10000,auth=password,value=mysecret`
* `xpra start --bind-tcp=0.0.0.0:10000,auth=file,filename=/path/to/mypasswordfile.txt`
* `xpra start --bind-tcp=0.0.0.0:10000,auth=sqlite,filename=/path/to/userlist.sdb`

Beware when mixing environment variables and password files as the latter may contain a trailing newline character whereas the former often do not.
</details>
Expand Down
2 changes: 1 addition & 1 deletion docs/Usage/Proxy-Server.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ xpra start :201 --bind-tcp=0.0.0.0:10101 --start=xterm
```
Start a proxy server on port 14501 using the "`sqlite`" authentication module (we will call this server `PROXYHOST`):
```shell
xpra proxy :100 --bind-tcp=0.0.0.0:14501,auth=sqlite:filename=./xpra-auth.sdb --socket-dir=/tmp
xpra proxy :100 --bind-tcp=0.0.0.0:14501,auth=sqlite,filename=./xpra-auth.sdb --socket-dir=/tmp
```
and add user entries (ie: `foo` with password `bar`), pointing to the `TARGETHOST` sessions (ie: `192.168.1.200` is the `TARGETHOST`'s IP in this example):
```shell
Expand Down

0 comments on commit 39527ec

Please sign in to comment.