diff --git a/CloudronManifest.json b/CloudronManifest.json index 7a2e213..74c149c 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -22,6 +22,7 @@ "localstorage": {}, "oidc": { "loginRedirectUri": "/oauth_callback" } }, + "optionalSso": true, "manifestVersion": 2, "website": "http://www.minio.io", "minBoxVersion": "7.1.2", diff --git a/POSTINSTALL.md b/POSTINSTALL.md index ea489de..637d4c6 100644 --- a/POSTINSTALL.md +++ b/POSTINSTALL.md @@ -5,10 +5,11 @@ Please use the following credentials to login: Please change the credentials immediately by following this [guide](https://cloudron.io/documentation/apps/minio/#admin-credentials). + By default, Cloudron users have `readwrite` access policy. If you'd like to change it, you should create a respective policy by following [Minio documentation](https://min.io/docs/minio/linux/administration/identity-access-management/policy-based-access-control.html) -After that you should add the variable MINIO_IDENTITY_OPENID_ROLE_POLICY in /app/data/env.sh, e.g. +After that you should add the variable `MINIO_IDENTITY_OPENID_ROLE_POLICY` in /app/data/env.sh, e.g. ``` export MINIO_IDENTITY_OPENID_ROLE_POLICY="new-policy-name" @@ -17,3 +18,4 @@ export MINIO_IDENTITY_OPENID_ROLE_POLICY="new-policy-name" Where `new-policy-name` is the policy you have created. Be sure to restart the app after making changes. + diff --git a/test/test.js b/test/test.js index 4917146..152e0a5 100644 --- a/test/test.js +++ b/test/test.js @@ -135,7 +135,44 @@ describe('Application life cycle test', function () { } xit('build app', function () { execSync('cloudron build', EXEC_ARGS); }); - it('install app', async function () { + + // no SSO + it('install app (no SSO)', async function () { + execSync(`cloudron install --no-sso --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS); + await timers.setTimeout(10000); + }); + + it('can get app information', getAppInfo); + + it('can Admin login', login.bind(null, 'minioadmin', 'minioadmin')); + it('can add bucket', addBucket); + it('can logout', logout); + it('does redirect', checkRedirect); + it('check api', checkApi); + + it('can change Admin credentials', async function () { + let data = fs.readFileSync(path.join(__dirname, '../env.sh'), 'utf8'); + data = data + .replace(/MINIO_ROOT_USER=.*/, 'MINIO_ROOT_USER=minioakey') + .replace(/MINIO_ROOT_PASSWORD=.*/, 'MINIO_ROOT_PASSWORD=minioskey'); + fs.writeFileSync('/tmp/env.sh', data); + execSync(`cloudron push --app ${app.id} /tmp/env.sh /app/data/env.sh`, EXEC_ARGS); + execSync(`cloudron restart --app ${app.id}`, EXEC_ARGS); + await timers.setTimeout(10000); + }); + + it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`, EXEC_ARGS); }); + + it('can Admin login', login.bind(null, 'minioakey', 'minioskey')); + it('has bucket', checkBucket); + it('can logout', logout); + it('does redirect', checkRedirect); + it('check api', checkApi); + it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); }); + + + // SSO + it('install app (SSO)', async function () { execSync(`cloudron install --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS); await timers.setTimeout(10000); });