Files
spaces-startos/startos/actions/disableSubsProverAuth.ts
T
spacesopsandCursor ad64a47d42
Build Service / BuildPackage (push) Has been cancelled
Release v0.1.1:2 with certrelay, nacho, and prebuilt subspaces.
Remove the embedded explorer/indexer stack, switch subspaces to prebuilt images, add certrelay and nacho as always-on services, expose Spaces and Subs APIs, and wire optional HTTP basic auth for subs and subs-prover with the correct SUBS_BASIC_AUTH_PASSWORD env var.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 12:06:16 -04:00

38 lines
1.2 KiB
TypeScript

import { storeJson } from '../fileModels/storeJson'
import { i18n } from '../i18n'
import { sdk } from '../sdk'
export const disableSubsProverAuth = sdk.Action.withoutInput(
// id
'disable-subs-prover-auth',
// metadata
async ({ effects }) => {
const enabled = await storeJson.read((s) => s.subsProverAuthEnabled).once()
return {
name: i18n('Disable Subspaces Prover Auth'),
description: i18n(
'Turn off HTTP basic auth in front of the Subspaces Prover. Stored credentials are preserved so re-enabling does not generate new ones; use "Set Subspaces Prover Auth Credentials" to rotate. Service restarts.',
),
warning: null,
allowedStatuses: 'any',
group: null,
visibility: enabled === true ? 'enabled' : 'hidden',
}
},
// run
async ({ effects }) => {
await storeJson.merge(effects, { subsProverAuthEnabled: false })
return {
version: '1',
title: i18n('Success'),
message: i18n(
'Subspaces Prover Auth disabled. The service is restarting; subs-prover will serve unauthenticated again on port 8888. Stored credentials are kept for the next enable.',
),
result: null,
}
},
)