Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
c9abd1c
feat: create key cli command logic and add to index command list
Jan 15, 2025
1390965
feat: add description flag, remove console log, and update readme
Jan 16, 2025
5196384
feat: add command to package.json scripts
Jan 16, 2025
689b3e1
feat: switch to nest-commander
elibosley Jan 17, 2025
76d6459
feat: cli Commands
elibosley Jan 17, 2025
37d3273
feat: better pm2 calls, log lines
elibosley Jan 17, 2025
9e1d9ca
fix: deprecated version warning
elibosley Jan 17, 2025
2ec0b54
feat: use execa for start and stop
elibosley Jan 17, 2025
01106bf
feat: remove unused vars
elibosley Jan 17, 2025
50bd797
feat: use zod to parse config
elibosley Jan 18, 2025
0fe0de1
feat: enable token sign in with comma separated subs in myservers.config
elibosley Jan 18, 2025
403b277
feat: cleanup config entries
elibosley Jan 19, 2025
ba79f6f
feat: remove unused config sections
elibosley Jan 19, 2025
b628a15
fix: start command simplification
elibosley Jan 19, 2025
9a694da
feat: only write config when a specific config update action occurs
elibosley Jan 20, 2025
4749c4c
fix: reset config to be closer to default
elibosley Jan 20, 2025
ac09577
fix: back to default configs
elibosley Jan 20, 2025
6bd2563
feat: csv validation
elibosley Jan 20, 2025
5c8248e
fix: stop command exits
elibosley Jan 20, 2025
1fe8e24
fix: unit tests updated
elibosley Jan 20, 2025
122c8ec
feat: remove unused fields
elibosley Jan 20, 2025
b6e9c1b
feat: unraid single sign on with account app
elibosley Jan 20, 2025
388fc96
feat: enable PR releases on non-mainline merges
elibosley Jan 20, 2025
2821b33
feat: dont pass entire server state for privacy
elibosley Jan 20, 2025
0d81f28
fix: pass token to password field
elibosley Jan 20, 2025
869b1a5
fix: pass ssoSubIds only
elibosley Jan 20, 2025
3c6a543
fix: further resolve sso sub ids issues
elibosley Jan 20, 2025
0a1d501
feat: inject after form
elibosley Jan 20, 2025
2bef667
fix: dev mode
elibosley Jan 20, 2025
46d1fe0
feat: use state passing to validate requests
elibosley Jan 20, 2025
e821ce8
feat: back to callbackUrl
elibosley Jan 20, 2025
1e0a728
feat: move ssoenabled to a boolean flag rather than ids
elibosley Jan 21, 2025
4a1f7fa
feat: sso button token exchange
elibosley Jan 21, 2025
ac1dfa1
feat: or button on sign in page
elibosley Jan 21, 2025
051badc
feat:sso login boolean
elibosley Jan 21, 2025
9d59044
feat: add user with cli
elibosley Jan 21, 2025
c3e6750
fix: dont remove login file without a backup presetn
elibosley Jan 22, 2025
880dff5
feat: glob for files
elibosley Jan 22, 2025
d7d93bf
fix: oauth2 api prefix
elibosley Jan 22, 2025
5d0476f
fix: padding and glob function issues
elibosley Jan 22, 2025
a94e2ec
feat: sso testing page and form disable on submit
elibosley Jan 23, 2025
764b916
feat: disable button on submit
elibosley Jan 23, 2025
2715360
feat: cleanup disclaimer and command to add users
elibosley Jan 23, 2025
0c68c6f
feat: remove sso user command
elibosley Jan 23, 2025
48427f9
feat: remove sso user options
elibosley Jan 23, 2025
2e01304
fix: remove unused login entries
elibosley Jan 23, 2025
6ca7dc2
feat: restoring sso error
elibosley Jan 23, 2025
ed5d64f
fix: lowercase or
elibosley Jan 23, 2025
fd7824b
feat: add line about recommendation for sso command
elibosley Jan 23, 2025
ceb7ae6
feat: CLI options for adding and deleting users
elibosley Jan 23, 2025
952c4c0
feat: zod config no longer any
elibosley Jan 23, 2025
c6309ed
feat: exit cli after running command
elibosley Jan 23, 2025
1e1ab7a
feat: remove apiKey from server
elibosley Jan 23, 2025
a7382d4
feat: Update plugin/source/dynamix.unraid.net/usr/local/emhttp/plugin…
elibosley Jan 23, 2025
af5e10a
fix: thorw on invalid token body
elibosley Jan 23, 2025
d048f11
feat: error state outside of button
elibosley Jan 23, 2025
f210c53
fix: initial feedback about report addressed
elibosley Jan 23, 2025
c9954b7
feat: secondary changes
elibosley Jan 23, 2025
05c221a
feat: address log level feedback
elibosley Jan 23, 2025
d31404b
feat: unnecessary comment
elibosley Jan 23, 2025
b570dd9
Update web/components/SsoButton.ce.vue
elibosley Jan 23, 2025
b1e1f30
fix: missing server type
elibosley Jan 23, 2025
79ee5d2
chore: update readme
elibosley Jan 23, 2025
1328919
feat: add api key creation logic
elibosley Jan 24, 2025
7e8634d
feat: warning on missing fields
elibosley Jan 24, 2025
b659c94
feat: state using crypto
elibosley Jan 24, 2025
4649620
feat: validate token format in both PHP and CLI
elibosley Jan 27, 2025
303d0fb
feat: try catch restart
elibosley Jan 27, 2025
33ea853
fix: remove isNaN in favor of number.isNaN
elibosley Jan 27, 2025
c8ec9f4
feat: default value for option
elibosley Jan 27, 2025
4eda715
feat: remove sso if disabled on Unraid-API start
elibosley Jan 27, 2025
2235396
feat: allow csrf passing through querystring
elibosley Jan 27, 2025
429b407
fix: pull token from query not params
elibosley Jan 27, 2025
6cbf3b2
fix: properly log error with template string
elibosley Jan 27, 2025
5b9f239
fix: unneeded await on api-key service
elibosley Jan 27, 2025
cb0468f
feat: revert local api key value
elibosley Jan 27, 2025
ed34c99
fix: shell path to unraid-api
elibosley Jan 27, 2025
6030cea
feat: restart the API when an SSO user is added
elibosley Jan 27, 2025
23a5920
fix: completion script registration
elibosley Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ jobs:

release-pull-request:
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.base.ref == 'main'
github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: [build-plugin]
steps:
Expand Down
34 changes: 24 additions & 10 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,60 @@ root@Devon:~# unraid-api

Unraid API

Thanks for using the official Unraid API
Thanks for using the official Unraid API

Usage:

$ unraid-api command <options>
$ unraid-api command <options>

Commands:

start/stop/restart/version/status/report/switch-env

Options:

-h, --help Prints this usage guide.
-d, --debug Enabled debug mode.
-p, --port string Set the graphql port.
--environment production/staging/development Set the working environment.
--log-level ALL/TRACE/DEBUG/INFO/WARN/ERROR/FATAL/MARK/OFF Set the log level.
-h, --help Prints this usage guide.
-d, --debug Enabled debug mode.
-p, --port string Set the graphql port.
--environment production/staging/development Set the working environment.
--log-level ALL/TRACE/DEBUG/INFO/WARN/ERROR/FATAL/MARK/OFF Set the log level.

Copyright © 2024 Lime Technology, Inc.

```

## Key

To create and work with Unraid API keys, used for the local API, run the following command to view all available options. These options may change over time.

```sh
unraid-api key --help
```

## Report

To view the current status of the unraid-api and its connection to mothership, run:
```

```sh
unraid-api report
```

To view verbose data (anonymized), run:
```

```sh
unraid-api report -v
```

To view non-anonymized verbose data, run:
```

```sh
unraid-api report -vv
```

## Secrets

If you found this file you're likely a developer. If you'd like to know more about the API and when it's available please join [our discord](https://discord.unraid.net/).

## License

Copyright Lime Technology Inc. All rights reserved.
7 changes: 2 additions & 5 deletions api/dev/Unraid.net/myservers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
version="3.11.0"
extraOrigins="https://google.com,https://test.com"
[local]
[notifier]
apikey="unnotify_30994bfaccf839c65bae75f7fa12dd5ee16e69389f754c3b98ed7d5"
[remote]
wanaccess="yes"
wanport="8443"
Expand All @@ -14,9 +12,8 @@ email="test@example.com"
username="zspearmint"
avatar="https://via.placeholder.com/200"
regWizTime="1611175408732_0951-1653-3509-FBA155FA23C0"
idtoken=""
accesstoken=""
idtoken=""
refreshtoken=""
dynamicRemoteAccessType="DISABLED"
[upc]
apikey="unupc_fab6ff6ffe51040595c6d9ffb63a353ba16cc2ad7d93f813a2e80a5810"
ssoSubIds=""
11 changes: 11 additions & 0 deletions api/dev/keys/b5b4aa3d-8e40-4c92-bc40-d50182071886.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"createdAt": "2025-01-27T16:22:56.501Z",
"description": "API key for Connect user",
"id": "b5b4aa3d-8e40-4c92-bc40-d50182071886",
"key": "_______________________LOCAL_API_KEY_HERE_________________________",
"name": "Connect",
"permissions": [],
"roles": [
"connect"
]
}
10 changes: 4 additions & 6 deletions api/dev/states/myservers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
version="3.11.0"
extraOrigins="https://google.com,https://test.com"
[local]
[notifier]
apikey="unnotify_30994bfaccf839c65bae75f7fa12dd5ee16e69389f754c3b98ed7d5"
[remote]
wanaccess="yes"
wanport="8443"
Expand All @@ -14,12 +12,12 @@ email="test@example.com"
username="zspearmint"
avatar="https://via.placeholder.com/200"
regWizTime="1611175408732_0951-1653-3509-FBA155FA23C0"
idtoken=""
accesstoken=""
idtoken=""
refreshtoken=""
allowedOrigins="/var/run/unraid-notifications.sock, /var/run/unraid-php.sock, /var/run/unraid-cli.sock, http://localhost:8080, https://localhost:4443, https://tower.local:4443, https://192.168.1.150:4443, https://tower:4443, https://192-168-1-150.thisisfourtyrandomcharacters012345678900.myunraid.net:4443, https://85-121-123-122.thisisfourtyrandomcharacters012345678900.myunraid.net:8443, https://10-252-0-1.hash.myunraid.net:4443, https://10-252-1-1.hash.myunraid.net:4443, https://10-253-3-1.hash.myunraid.net:4443, https://10-253-4-1.hash.myunraid.net:4443, https://10-253-5-1.hash.myunraid.net:4443, https://10-100-0-1.hash.myunraid.net:4443, https://10-100-0-2.hash.myunraid.net:4443, https://10-123-1-2.hash.myunraid.net:4443, https://221-123-121-112.hash.myunraid.net:4443, https://google.com, https://test.com, https://connect.myunraid.net, https://connect-staging.myunraid.net, https://dev-my.myunraid.net:4000, https://studio.apollographql.com"
dynamicRemoteAccessType="DISABLED"
[upc]
apikey="unupc_fab6ff6ffe51040595c6d9ffb63a353ba16cc2ad7d93f813a2e80a5810"
ssoSubIds=""
allowedOrigins="/var/run/unraid-notifications.sock, /var/run/unraid-php.sock, /var/run/unraid-cli.sock, http://localhost:8080, https://localhost:4443, https://tower.local:4443, https://192.168.1.150:4443, https://tower:4443, https://192-168-1-150.thisisfourtyrandomcharacters012345678900.myunraid.net:4443, https://85-121-123-122.thisisfourtyrandomcharacters012345678900.myunraid.net:8443, https://10-252-0-1.hash.myunraid.net:4443, https://10-252-1-1.hash.myunraid.net:4443, https://10-253-3-1.hash.myunraid.net:4443, https://10-253-4-1.hash.myunraid.net:4443, https://10-253-5-1.hash.myunraid.net:4443, https://10-100-0-1.hash.myunraid.net:4443, https://10-100-0-2.hash.myunraid.net:4443, https://10-123-1-2.hash.myunraid.net:4443, https://221-123-121-112.hash.myunraid.net:4443, https://google.com, https://test.com, https://connect.myunraid.net, https://connect-staging.myunraid.net, https://dev-my.myunraid.net:4000, https://studio.apollographql.com"
[connectionStatus]
minigraph="PRE_INIT"
upnpStatus=""
2 changes: 0 additions & 2 deletions api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

x-volumes: &volumes
volumes:
- ./dev:/app/dev
Expand Down
Loading
Loading