forked from katzen-cafe/katzen-cafe
get mediawiki working finally with auth and permissions
This commit is contained in:
parent
0e23e021c1
commit
530087cf05
6 changed files with 237 additions and 22 deletions
|
@ -36,15 +36,33 @@
|
|||
virtualHost.adminAddr = "admin@katzen.cafe";
|
||||
passwordFile = "/var/mediawiki/passwordFile";
|
||||
extraConfig = ''
|
||||
# $wgShowExceptionDetails = true;
|
||||
# $wgDebugToolbar = true;
|
||||
# $wgShowDebug = true;
|
||||
# $wgDevelopmentWarnings = true;
|
||||
|
||||
# Disable anonymous editing
|
||||
$wgGroupPermissions['*']['edit'] = false;
|
||||
$wgGroupPermissions['oidc_editor']['edit'] = true;
|
||||
$wgGroupPermissions['oidc_editor']['createpage'] = true;
|
||||
|
||||
$wgGroupPermissions['oidc_interface_admin'] = $wgGroupPermissions['interface_admin'];
|
||||
$wgGroupPermissions['oidc_admin'] = $wgGroupPermissions['sysop'];
|
||||
$wgGroupPermissions['oidc_admin']['userrights'] = true;
|
||||
|
||||
$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";
|
||||
$wgPluggableAuth_Config["katzen.cafe authentication"] = [
|
||||
|
||||
$oidcClientSecret = file_get_contents('/var/mediawiki/keycloakClientSecret', false, null, 0, 32);
|
||||
|
||||
$wgPluggableAuth_Config[] = [
|
||||
'plugin' => 'OpenIDConnect',
|
||||
'data' => [
|
||||
'providerURL' => 'https://auth.katzen.cafe/realms/master/',
|
||||
'providerURL' => 'https://auth.katzen.cafe/realms/phtanum-b',
|
||||
'clientID' => 'phtanumb-wiki',
|
||||
'clientsecret' => '/var/mediawiki/keycloakClientSecret',
|
||||
# hack to try dynamically get the secret
|
||||
'clientsecret' => $oidcClientSecret,
|
||||
'global_roles' => ['property' => ['realm_access', 'roles']],
|
||||
'wiki_roles' => ['property' => ['resource_access', 'phtanumb-wiki', 'roles']]
|
||||
]
|
||||
];
|
||||
'';
|
||||
|
@ -65,12 +83,13 @@
|
|||
};
|
||||
deployment.keys = {
|
||||
"passwordFile" = {
|
||||
keyCommand = [ "cat" "/home/jade/keys/phtanumb-wiki/passwordFile" ];
|
||||
keyCommand = [ "cat" "/home/jade/keys-tmp/phtanumb-wiki-passwordFile" ];
|
||||
destDir = "/phtanum-b/wiki";
|
||||
};
|
||||
"keycloakClientSecret" = {
|
||||
keyCommand = [ "cat" "/home/jade/keys-tmp/phtanumb-wiki-keycloak-secret" ];
|
||||
destDir = "/phtanum-b/wiki";
|
||||
permissions = "0604";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue