Build Service / BuildPackage (push) Has been cancelled
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>
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { storeJson } from '../fileModels/storeJson'
|
|
import { i18n } from '../i18n'
|
|
import { sdk } from '../sdk'
|
|
|
|
export const disableSubsAuth = sdk.Action.withoutInput(
|
|
// id
|
|
'disable-subs-auth',
|
|
|
|
// metadata
|
|
async ({ effects }) => {
|
|
const enabled = await storeJson.read((s) => s.subsAuthEnabled).once()
|
|
return {
|
|
name: i18n('Disable Subspaces Auth'),
|
|
description: i18n(
|
|
'Turn off HTTP basic auth in front of the Subspaces Web UI / Subs API. Stored credentials are preserved so re-enabling does not generate new ones; use "Set Subspaces Auth Credentials" to rotate. Service restarts.',
|
|
),
|
|
warning: null,
|
|
allowedStatuses: 'any',
|
|
group: null,
|
|
visibility: enabled === true ? 'enabled' : 'hidden',
|
|
}
|
|
},
|
|
|
|
// run
|
|
async ({ effects }) => {
|
|
await storeJson.merge(effects, { subsAuthEnabled: false })
|
|
|
|
return {
|
|
version: '1',
|
|
title: i18n('Success'),
|
|
message: i18n(
|
|
'Subspaces Auth disabled. The service is restarting; subs will serve unauthenticated again on port 7777. Stored credentials are kept for the next enable.',
|
|
),
|
|
result: null,
|
|
}
|
|
},
|
|
)
|