Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added switch to enable/disable offline access for new clients #1182

Merged
merged 8 commits into from
Apr 23, 2024

Conversation

NithinKuruba
Copy link
Contributor

@NithinKuruba NithinKuruba commented Apr 22, 2024

A new switch added to each environment in request integration form to enable/disable offline access. This applies to only new integrations and existing ones are grandfathered in, i.e. enabled by default.

This also fixes the issue with additional_client_roles where the mapper was not getting updated with new name.

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖success

Show Plan

terraform

Pusher: @NithinKuruba, Action: pull_request

@NithinKuruba NithinKuruba added feature enhancement New feature or request and removed feature labels Apr 22, 2024
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖success

Show Plan

terraform

Pusher: @NithinKuruba, Action: pull_request

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖success

Show Plan

terraform

Pusher: @NithinKuruba, Action: pull_request

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 81.63265% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 71.27%. Comparing base (e65099a) to head (f9b2868).
Report is 1 commits behind head on dev.

Files Patch % Lines
lambda/app/src/keycloak/integration.ts 25.00% 6 Missing ⚠️
....04.18T00.00.00.add-flag-offline-access-enabled.ts 83.33% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1182      +/-   ##
==========================================
+ Coverage   71.16%   71.27%   +0.10%     
==========================================
  Files         299      301       +2     
  Lines       10338    10447     +109     
  Branches     2400     2456      +56     
==========================================
+ Hits         7357     7446      +89     
- Misses       2981     3001      +20     
Flag Coverage Δ
unitests 71.27% <81.63%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

jlangy and others added 2 commits April 22, 2024 15:58
* chore: update migrator

add migrator args

* chore: update deps

update e2e deps
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖success

Show Plan

terraform

Pusher: @NithinKuruba, Action: pull_request

1 similar comment
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖success

Show Plan

terraform

Pusher: @NithinKuruba, Action: pull_request

await kcAdminClient.clients.addOptionalClientScope({
id: client.id,
clientScopeId: clientScopeList.find((defaultClientscope) => defaultClientscope.name === 'offline_access')?.id,
realm,
});
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we collapse this else/if to one line?

id: client.id,
realm,
mapperId: additionalClientRolesMapper?.id,
});
}
} else if (integration.protocol === 'saml') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe collapse these nested ifs to 1 line.

@@ -330,7 +361,7 @@ export const keycloakClient = async (
}
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
8.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖success

Show Plan

terraform

Pusher: @NithinKuruba, Action: pull_request

@NithinKuruba NithinKuruba merged commit 130e3d1 into dev Apr 23, 2024
8 of 9 checks passed
@NithinKuruba NithinKuruba deleted the SSOTEAM-1464 branch April 23, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants