CLOUDRON_OIDC_PROVIDER_NAME implemented
checklist added tests updated
This commit is contained in:
parent
43bde46b81
commit
3d77021618
|
@ -25,9 +25,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optionalSso": true,
|
"optionalSso": true,
|
||||||
|
"checklist": {
|
||||||
|
"change-default-password": {
|
||||||
|
"sso": false,
|
||||||
|
"message": "Change the default admin credentials by following this [guide](https://cloudron.io/documentation/apps/minio/#admin-credentials)"
|
||||||
|
}
|
||||||
|
},
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
"website": "http://www.minio.io",
|
"website": "http://www.minio.io",
|
||||||
"minBoxVersion": "7.1.2",
|
"minBoxVersion": "8.1.0",
|
||||||
"forumUrl": "https://forum.cloudron.io/category/69/minio",
|
"forumUrl": "https://forum.cloudron.io/category/69/minio",
|
||||||
"documentationUrl": "https://docs.cloudron.io/apps/minio/",
|
"documentationUrl": "https://docs.cloudron.io/apps/minio/",
|
||||||
"contactEmail": "support@cloudron.io",
|
"contactEmail": "support@cloudron.io",
|
||||||
|
|
|
@ -4,7 +4,6 @@ Please use the following credentials to login:
|
||||||
**Username**: minioadmin<br/>
|
**Username**: minioadmin<br/>
|
||||||
**Password**: minioadmin<br/>
|
**Password**: minioadmin<br/>
|
||||||
|
|
||||||
Please change the credentials immediately by following this [guide](https://cloudron.io/documentation/apps/minio/#admin-credentials).
|
|
||||||
</nosso>
|
</nosso>
|
||||||
|
|
||||||
<sso>
|
<sso>
|
||||||
|
|
2
start.sh
2
start.sh
|
@ -29,7 +29,7 @@ if [[ ! -d /app/data/mc_config ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
||||||
export MINIO_IDENTITY_OPENID_DISPLAY_NAME="Cloudron"
|
export MINIO_IDENTITY_OPENID_DISPLAY_NAME="${CLOUDRON_OIDC_PROVIDER_NAME:-Cloudron}"
|
||||||
export MINIO_IDENTITY_OPENID_CONFIG_URL="${CLOUDRON_OIDC_DISCOVERY_URL}"
|
export MINIO_IDENTITY_OPENID_CONFIG_URL="${CLOUDRON_OIDC_DISCOVERY_URL}"
|
||||||
export MINIO_IDENTITY_OPENID_CLIENT_ID="${CLOUDRON_OIDC_CLIENT_ID}"
|
export MINIO_IDENTITY_OPENID_CLIENT_ID="${CLOUDRON_OIDC_CLIENT_ID}"
|
||||||
export MINIO_IDENTITY_OPENID_CLIENT_SECRET="${CLOUDRON_OIDC_CLIENT_SECRET}"
|
export MINIO_IDENTITY_OPENID_CLIENT_SECRET="${CLOUDRON_OIDC_CLIENT_SECRET}"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
31
test/test.js
31
test/test.js
|
@ -30,7 +30,7 @@ describe('Application life cycle test', function () {
|
||||||
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||||
|
|
||||||
let browser, app;
|
let browser, app;
|
||||||
let athenticated_by_oidc = false, rootPassword;
|
let rootPassword;
|
||||||
const username = process.env.USERNAME;
|
const username = process.env.USERNAME;
|
||||||
const password = process.env.PASSWORD;
|
const password = process.env.PASSWORD;
|
||||||
|
|
||||||
|
@ -89,23 +89,22 @@ describe('Application life cycle test', function () {
|
||||||
await timers.setTimeout(5000);
|
await timers.setTimeout(5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loginOIDC(username, password) {
|
async function loginOIDC(username, password, alreadyAuthenticated = true) {
|
||||||
browser.manage().deleteAllCookies();
|
browser.manage().deleteAllCookies();
|
||||||
await browser.get(`https://${app.fqdn}/login`);
|
await browser.get(`https://${app.fqdn}/login`);
|
||||||
await browser.sleep(10000);
|
await browser.sleep(10000);
|
||||||
|
|
||||||
await browser.findElement(By.xpath('//button[contains(., "Cloudron")]')).click();
|
await waitForElement(By.xpath('//button[contains(., "iam")]'));
|
||||||
|
await browser.findElement(By.xpath('//button[contains(., "iam")]')).click();
|
||||||
await browser.sleep(10000);
|
await browser.sleep(10000);
|
||||||
|
|
||||||
if (!athenticated_by_oidc) {
|
if (!alreadyAuthenticated) {
|
||||||
await waitForElement(By.xpath('//input[@name="username"]'));
|
await waitForElement(By.id('inputUsername'));
|
||||||
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
|
await browser.findElement(By.id('inputUsername')).sendKeys(username);
|
||||||
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
|
await browser.findElement(By.id('inputPassword')).sendKeys(password);
|
||||||
await browser.sleep(2000);
|
|
||||||
await browser.findElement(By.id('loginSubmitButton')).click();
|
await browser.findElement(By.id('loginSubmitButton')).click();
|
||||||
await browser.sleep(2000);
|
|
||||||
|
|
||||||
athenticated_by_oidc = true;
|
await browser.sleep(2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
await waitForElement(By.xpath('//span[contains(text(), "Buckets")]'));
|
await waitForElement(By.xpath('//span[contains(text(), "Buckets")]'));
|
||||||
|
@ -210,7 +209,7 @@ describe('Application life cycle test', function () {
|
||||||
it('does redirect', checkRedirect);
|
it('does redirect', checkRedirect);
|
||||||
it('check api', checkApi);
|
it('check api', checkApi);
|
||||||
|
|
||||||
it('can OIDC login', loginOIDC.bind(null, username, password));
|
it('can OIDC login', loginOIDC.bind(null, username, password, false));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
@ -227,7 +226,7 @@ describe('Application life cycle test', function () {
|
||||||
it('does redirect', checkRedirect);
|
it('does redirect', checkRedirect);
|
||||||
it('check api', checkApi);
|
it('check api', checkApi);
|
||||||
|
|
||||||
it('can OIDC login', loginOIDC.bind(null, username, password));
|
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
@ -246,7 +245,7 @@ describe('Application life cycle test', function () {
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can OIDC login', loginOIDC.bind(null, username, password));
|
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
@ -264,7 +263,7 @@ describe('Application life cycle test', function () {
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can OIDC login', loginOIDC.bind(null, username, password));
|
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
@ -282,7 +281,7 @@ describe('Application life cycle test', function () {
|
||||||
it('can add buckets', addBucket);
|
it('can add buckets', addBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can OIDC login', loginOIDC.bind(null, username, password));
|
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
@ -294,7 +293,7 @@ describe('Application life cycle test', function () {
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can OIDC login', loginOIDC.bind(null, username, password));
|
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue