Skip to content

Commit

Permalink
new build version
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredperreault-okta committed Jan 12, 2023
1 parent 78de9fc commit 680cbe8
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion scripts/setup-dockolith.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
source $DIR/setup.sh

# Monolith version to test against
DEFAULT_BUILDVERSION="2022.12.2-begin-259-gdeb54c572369"
DEFAULT_BUILDVERSION="2023.01.0-begin-178-g3c9d16dc4c1a"
export MONOLITH_BUILDVERSION="${MONOLITH_BUILDVERSION:-$DEFAULT_BUILDVERSION}"

set +e
Expand Down
105 changes: 53 additions & 52 deletions test/support/monolith/create-e2e-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,49 @@ async function bootstrap() {
const subDomain = process.env.TEST_ORG_SUBDOMAIN || 'authjs-test-' + Date.now();
const outputFilePath = path.join(__dirname, '../../../', 'testenv.local');

const options = {
enableFFs: [
'API_ACCESS_MANAGEMENT',
'ENG_ENABLE_SSU_FOR_OIE',
],
disableFFs: [
'REQUIRE_PKCE_FOR_OIDC_APPS'
],
users: [
{
firstName: 'Saml',
lastName: 'Jackson',
email: 'george@acme.com',
password: 'Abcd1234'
},
{
firstName: 'Alexander',
lastName: 'Hamilton',
email: 'mary@acme.com',
password: 'Abcd1234'
}
],
apps: [
{
label: 'AUTHJS WEB APP',
appType: 'web',
interactionCode: true
},
{
label: 'AUTHJS SPA APP',
appType: 'browser',
interactionCode: true,
refreshToken: true
}
],
origins: [
{
name: 'AuthJS Test App',
origin: 'http://localhost:8080',
}
]
};

console.error(`Bootstrap starting: ${subDomain}`);

const config = await dockolith.createTestOrg({
Expand All @@ -29,6 +72,16 @@ async function bootstrap() {
await dockolith.enableOIE(orgId);
await dockolith.activateOrgFactor(config, 'okta_email');
await dockolith.disableStepUpForPasswordRecovery(config);
await dockolith.enableEmbeddedLogin(config);

// Set Feature flags
console.error('Setting feature flags...');
for (const option of options.enableFFs) {
await dockolith.enableFeatureFlag(config, orgId, option);
}
for (const option of options.disableFFs) {
await dockolith.disableFeatureFlag(config, orgId, option);
}

// Enable interaction_code grant on the default authorization server
const authServer = await dockolith.getDefaultAuthorizationServer(config);
Expand Down Expand Up @@ -78,58 +131,6 @@ async function bootstrap() {
};
catchAll.update(spaPolicy.id);

const options = {
enableFFs: [
'API_ACCESS_MANAGEMENT',
'ENG_ENABLE_SSU_FOR_OIE',
],
disableFFs: [
'REQUIRE_PKCE_FOR_OIDC_APPS'
],
users: [
{
firstName: 'Saml',
lastName: 'Jackson',
email: 'george@acme.com',
password: 'Abcd1234'
},
{
firstName: 'Alexander',
lastName: 'Hamilton',
email: 'mary@acme.com',
password: 'Abcd1234'
}
],
apps: [
{
label: 'AUTHJS WEB APP',
appType: 'web',
interactionCode: true
},
{
label: 'AUTHJS SPA APP',
appType: 'browser',
interactionCode: true,
refreshToken: true
}
],
origins: [
{
name: 'AuthJS Test App',
origin: 'http://localhost:8080',
}
]
};

// Set Feature flags
console.error('Setting feature flags...');
for (const option of options.enableFFs) {
await dockolith.enableFeatureFlag(config, orgId, option);
}
for (const option of options.disableFFs) {
await dockolith.disableFeatureFlag(config, orgId, option);
}

// Add Trusted origins
for (const option of options.origins) {
await oktaClient.listOrigins().each(async (origin) => {
Expand Down

0 comments on commit 680cbe8

Please sign in to comment.