refactor(core)!: Remove basic-auth, external-jwt-auth, and no-auth options (#6362)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
committed by
कारतोफ्फेलस्क्रिप्ट™
parent
a45a2c8c41
commit
8c008f5d22
@@ -18,31 +18,17 @@ import { isApiEnabled } from '@/PublicApi';
|
||||
function getSecuritySettings() {
|
||||
if (config.getEnv('deployment.type') === 'cloud') return null;
|
||||
|
||||
const userManagementEnabled = !config.getEnv('userManagement.disabled');
|
||||
const basicAuthActive = config.getEnv('security.basicAuth.active');
|
||||
const jwtAuthActive = config.getEnv('security.jwtAuth.active');
|
||||
|
||||
const isInstancePubliclyAccessible = !userManagementEnabled && !basicAuthActive && !jwtAuthActive;
|
||||
|
||||
const settings: Record<string, unknown> = {};
|
||||
|
||||
if (isInstancePubliclyAccessible) {
|
||||
settings.publiclyAccessibleInstance =
|
||||
'Important! Your n8n instance is publicly accessible. Any third party who knows your instance URL can access your data.'.toUpperCase();
|
||||
}
|
||||
|
||||
settings.features = {
|
||||
communityPackagesEnabled: config.getEnv('nodes.communityPackages.enabled'),
|
||||
versionNotificationsEnabled: config.getEnv('versionNotifications.enabled'),
|
||||
templatesEnabled: config.getEnv('templates.enabled'),
|
||||
publicApiEnabled: isApiEnabled(),
|
||||
userManagementEnabled,
|
||||
};
|
||||
|
||||
settings.auth = {
|
||||
authExcludeEndpoints: config.getEnv('security.excludeEndpoints') || 'none',
|
||||
basicAuthActive,
|
||||
jwtAuthActive,
|
||||
};
|
||||
|
||||
settings.nodes = {
|
||||
|
||||
Reference in New Issue
Block a user