Selaa lähdekoodia

docs: upgrade note for justification checks on StartActionByGet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesread 1 päivä sitten
vanhempi
sitoutus
4c7df75eaa

+ 2 - 0
docs/modules/ROOT/pages/api/method_StartActionByGet.adoc

@@ -7,6 +7,8 @@
 Despite its name, this method no longer supports `GET` requests. The OliveTin 2k style of putting the action ID in the URL (eg: `GET /api/StartActionByGet/pingGithub`) returns `404` in OliveTin 3k, and is not coming back.
 ====
 
+This method cannot send a justification. If the action requires one, the call is refused with `invalid_argument`, unless the action's justification template fills it in. Use `StartAction` with a `justification` instead. See xref:upgrade/upgrade_notes.adoc#start-action-by-get-justification[Upgrade Notes].
+
 == Migrating to `StartAction`
 
 `StartActionByGet` takes only an `actionId`, and returns an Execution Tracking ID. `StartAction` does the same with `bindingId` - for a normal action, the binding ID is the same as the action `id` from your `config.yaml` (see xref:api/start_action.adoc#api-ids[Action IDs vs Binding IDs]).

+ 2 - 0
docs/modules/ROOT/pages/api/method_StartActionByGetAndWait.adoc

@@ -7,6 +7,8 @@
 Despite its name, this method no longer supports `GET` requests. The OliveTin 2k style of putting the action ID in the URL (eg: `GET /api/StartActionByGetAndWait/pingGithub`) returns `404` in OliveTin 3k, and is not coming back.
 ====
 
+This method cannot send a justification. If the action requires one, the call is refused with `invalid_argument`, unless the action's justification template fills it in. Use `StartActionAndWait` with a `justification` instead. See xref:upgrade/upgrade_notes.adoc#start-action-by-get-justification[Upgrade Notes].
+
 == Migrating to `StartActionAndWait`
 
 `StartActionAndWait` takes the same `actionId` field, and returns the same Log Entry, so you only need to change the method name. It also accepts `arguments` and a `justification`.

+ 7 - 0
docs/modules/ROOT/pages/upgrade/upgrade_notes.adoc

@@ -54,6 +54,13 @@ OliveTin now keeps up to 2000 execution logs in memory, and removes the oldest f
 
 If you want a longer history in the web interface, raise `logHistoryLimit` in your config. Logs saved to disk with `saveLogs` are not affected. See xref:logs/saving.adoc#log-history-limit[How many logs are kept in memory].
 
+[#start-action-by-get-justification]
+=== `StartActionByGet` and `StartActionByGetAndWait` now check required justifications
+
+The deprecated `StartActionByGet` and `StartActionByGetAndWait` API methods used to run actions that require a justification without one. They now refuse them with "justification is required for this action", in the same way as `StartAction` and `StartActionAndWait`, unless the action's justification template fills one in. These methods cannot send a justification, so if a script calls them for such an action, change it to call `StartAction` or `StartActionAndWait` with a `justification`. See xref:api/method_StartActionByGetAndWait.adoc[StartActionByGetAndWait].
+
+Users logged in with trusted header authentication (`authHttpHeaderUsername`) now always have the provider `trusted-header`. OliveTin used to copy a `provider` request header into the user's provider, which let a client claim to be a `system` user and skip a required justification. This only affects you if something reads the provider from the `WhoAmI` or `Init` API for these users.
+
 == 2024.08.14
 
 === Navigation change - Subpaths no longer supported