mirror of
https://github.com/tale/headplane.git
synced 2026-08-25 20:06:48 +00:00
chore: add deprecation notice for oidc user file
This commit is contained in:
@@ -91,7 +91,7 @@ const partialOidcConfig = type({
|
|||||||
token_endpoint_auth_method:
|
token_endpoint_auth_method:
|
||||||
'"client_secret_basic" | "client_secret_post" | "client_secret_jwt"?',
|
'"client_secret_basic" | "client_secret_post" | "client_secret_jwt"?',
|
||||||
redirect_uri: 'string.url?',
|
redirect_uri: 'string.url?',
|
||||||
user_storage_file: 'string = "/var/lib/headplane/users.json"',
|
user_storage_file: 'string?',
|
||||||
disable_api_key_login: stringToBool.optional(),
|
disable_api_key_login: stringToBool.optional(),
|
||||||
headscale_api_key: 'string?',
|
headscale_api_key: 'string?',
|
||||||
headscale_api_key_path: 'string?',
|
headscale_api_key_path: 'string?',
|
||||||
|
|||||||
@@ -221,6 +221,23 @@ async function migrateUserDatabase(path: string, db: LibSQLDatabase) {
|
|||||||
log.info('config', 'Migrating old user database from %s', path);
|
log.info('config', 'Migrating old user database from %s', path);
|
||||||
const realPath = resolve(path);
|
const realPath = resolve(path);
|
||||||
|
|
||||||
|
log.warn(
|
||||||
|
'config',
|
||||||
|
'oidc.user_storage_file is deprecated and will be removed in Headplane 0.7.0',
|
||||||
|
);
|
||||||
|
log.warn(
|
||||||
|
'config',
|
||||||
|
'You can ignore this warning if you do not use OIDC authentication.',
|
||||||
|
);
|
||||||
|
log.warn(
|
||||||
|
'config',
|
||||||
|
'Data will be automatically migrated to the new SQL database.',
|
||||||
|
);
|
||||||
|
log.warn(
|
||||||
|
'config',
|
||||||
|
'Refer to server.data_path to ensure this path is mounted correctly is using Docker.',
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const handle = await open(realPath, 'a+');
|
const handle = await open(realPath, 'a+');
|
||||||
await handle.close();
|
await handle.close();
|
||||||
|
|||||||
+1
-4
@@ -17,6 +17,7 @@ server:
|
|||||||
# any cache related files.
|
# any cache related files.
|
||||||
#
|
#
|
||||||
# Data formats prior to 0.6.1 will automatically be migrated.
|
# Data formats prior to 0.6.1 will automatically be migrated.
|
||||||
|
# PLEASE ensure this directory is mounted if running in Docker.
|
||||||
data_path: "/var/lib/headplane"
|
data_path: "/var/lib/headplane"
|
||||||
|
|
||||||
# Headscale specific settings to allow Headplane to talk
|
# Headscale specific settings to allow Headplane to talk
|
||||||
@@ -161,10 +162,6 @@ oidc:
|
|||||||
# for your Headplane instance with /admin/oidc/callback
|
# for your Headplane instance with /admin/oidc/callback
|
||||||
redirect_uri: "http://localhost:3000/admin/oidc/callback"
|
redirect_uri: "http://localhost:3000/admin/oidc/callback"
|
||||||
|
|
||||||
# Stores the users and their permissions for Headplane
|
|
||||||
# This is a path to a JSON file, default is specified below.
|
|
||||||
user_storage_file: "/var/lib/headplane/users.json"
|
|
||||||
|
|
||||||
# By default profile pictures are pulled from the OIDC provider when
|
# By default profile pictures are pulled from the OIDC provider when
|
||||||
# we go to fetch the userinfo endpoint. Optionally, this can be set to
|
# we go to fetch the userinfo endpoint. Optionally, this can be set to
|
||||||
# "oidc" or "gravatar" as of 0.6.1.
|
# "oidc" or "gravatar" as of 0.6.1.
|
||||||
|
|||||||
Reference in New Issue
Block a user