|
9 | 9 | with [`migrate-config`](#migrating-your-config). |
10 | 10 | - If you set list or map environment variables, their syntax changed, see |
11 | 11 | [List and map syntax](#list-and-map-syntax). |
| 12 | +- API tokens are no longer returned in the GET endpoints and are only exposed |
| 13 | + on creation or rotation. See [Tokens are only shown once](#tokens-are-only-shown-once). |
12 | 14 | - If you have scripts hitting client-token endpoints, they may now need |
13 | 15 | [elevation](#adapting-your-scripts). |
14 | 16 |
|
@@ -78,34 +80,52 @@ GOTIFY_SERVER_RESPONSEHEADERS={"X-Custom-Header":"custom value"} |
78 | 80 |
|
79 | 81 | ## API Changes |
80 | 82 |
|
| 83 | +### Tokens are only shown once |
| 84 | + |
| 85 | +As part of an effort to align with secure API design principles, |
| 86 | +tokens will no longer be returned via the API or WebUI except when the token is issued via creation or rotation. |
| 87 | +Workflows dependent on introspecting existing clients or applications for their token will stop working. |
| 88 | + |
| 89 | +::: tip |
| 90 | +The post message endpoint now accepts an "appid" parameter, which allows clients |
| 91 | +to impersonate applications they control without knowing the corresponding application token. |
| 92 | +::: |
| 93 | + |
| 94 | +Tokens for existing applications can now be rotated via the _application security update_ endpoint. |
| 95 | + |
| 96 | +Existing tokens (starting with `A` and `C`) will continue to work. |
| 97 | +Plugin tokens (starting with `P`) used to access web resources are not affected by this change. |
| 98 | + |
| 99 | +### Step-up Authentication |
| 100 | + |
81 | 101 | Introduces step-up authentication via time-limited [session |
82 | 102 | elevation](./session-elevation.md). A session/client token must re-authenticate |
83 | 103 | before sensitive, hard-to-undo actions. |
84 | 104 |
|
85 | 105 | HTTP Basic auth and application tokens are unaffected. |
86 | 106 |
|
87 | | -### Endpoints that now require elevation |
88 | | - |
89 | 107 | With a non-elevated client token these return `403`: |
90 | 108 |
|
91 | 109 | | Endpoint | Action | |
92 | 110 | | :-------------------------------------------- | :----------------------------- | |
93 | 111 | | `POST /current/user/password` | Change current user's password | |
94 | 112 | | `DELETE /client/{id}` | Delete a client | |
95 | 113 | | `DELETE /application/{id}` | Delete an application | |
| 114 | +| `PUT /application/{id}/security` | Application security update | |
96 | 115 | | `POST /client/{id}/elevate` | Elevate a client token | |
97 | 116 | | `GET /user`, `GET`/`POST`/`DELETE /user/{id}` | Manage users (admin) | |
98 | 117 |
|
99 | 118 | The `Client` and `CurrentUser` models have gotten elevation-related fields. See the |
100 | 119 | [API documentation](/api-docs) for details. |
101 | 120 |
|
102 | | -### Adapting your scripts |
| 121 | +::: tip |
| 122 | + |
| 123 | +To update your workflow that uses the endpoints above with a client token. Perform a separate elevation process before the call. Either: |
103 | 124 |
|
104 | | -Scripts that hit the endpoints above with a client token now need that token to |
105 | | -be elevated. Either: |
| 125 | +- Transitition to use HTTP Basic auth as they are elevated by default. |
| 126 | +- Elevate the client in the WebUI or the api with basic auth before calling these APIs. |
106 | 127 |
|
107 | | -- Use HTTP Basic auth as they are elevated by default. |
108 | | -- Elevate the client in the WebUI or the api with basic auth. |
| 128 | +::: |
109 | 129 |
|
110 | 130 | ## CLI Changes |
111 | 131 |
|
|
0 commit comments