Release v0.1.1:2 with certrelay, nacho, and prebuilt subspaces.
Build Service / BuildPackage (push) Has been cancelled
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>
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
import { storeJson } from '../fileModels/storeJson'
|
||||
import { i18n } from '../i18n'
|
||||
import { sdk } from '../sdk'
|
||||
import { SUBSPACES_UI_PORT } from '../utils'
|
||||
|
||||
export const showSubsCredentials = sdk.Action.withoutInput(
|
||||
// id
|
||||
'show-subs-credentials',
|
||||
|
||||
// metadata
|
||||
async ({ effects }) => ({
|
||||
name: i18n('Show Subspaces Auth Credentials'),
|
||||
description: i18n(
|
||||
'Display the HTTP basic auth username and password used in front of the Subspaces Web UI and Subs API. Returns blanks if no credentials have been set yet.',
|
||||
),
|
||||
warning: null,
|
||||
allowedStatuses: 'any',
|
||||
group: null,
|
||||
visibility: 'enabled',
|
||||
}),
|
||||
|
||||
// run
|
||||
async ({ effects }) => {
|
||||
const [subsAuth, enabled] = await Promise.all([
|
||||
storeJson.read((s) => s.subsAuth).once(),
|
||||
storeJson.read((s) => s.subsAuthEnabled).once(),
|
||||
])
|
||||
|
||||
const username = subsAuth?.username ?? ''
|
||||
const password = subsAuth?.password ?? ''
|
||||
const status =
|
||||
enabled === true
|
||||
? i18n('Auth is ENABLED — these credentials are enforced.')
|
||||
: i18n(
|
||||
'Auth is DISABLED — subs is serving unauthenticated. These credentials will take effect when enabled.',
|
||||
)
|
||||
const url = subsAuth
|
||||
? `http://${subsAuth.username}:${subsAuth.password}@127.0.0.1:${SUBSPACES_UI_PORT}`
|
||||
: ''
|
||||
|
||||
return {
|
||||
version: '1',
|
||||
title: i18n('Show Subspaces Auth Credentials'),
|
||||
message: status,
|
||||
result: {
|
||||
type: 'group',
|
||||
value: [
|
||||
{
|
||||
type: 'single',
|
||||
name: i18n('SUBS_BASIC_AUTH_USER'),
|
||||
description: null,
|
||||
value: username,
|
||||
masked: false,
|
||||
copyable: true,
|
||||
qr: false,
|
||||
},
|
||||
{
|
||||
type: 'single',
|
||||
name: i18n('SUBS_BASIC_AUTH_PASSWORD'),
|
||||
description: null,
|
||||
value: password,
|
||||
masked: true,
|
||||
copyable: true,
|
||||
qr: false,
|
||||
},
|
||||
{
|
||||
type: 'single',
|
||||
name: i18n('Connection URL'),
|
||||
description: null,
|
||||
value: url,
|
||||
masked: true,
|
||||
copyable: true,
|
||||
qr: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user