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

Add IdentitySession infrastructure. #18242

Merged
merged 32 commits into from
Mar 22, 2024
Merged

Add IdentitySession infrastructure. #18242

merged 32 commits into from
Mar 22, 2024

Conversation

maliming
Copy link
Member

No description provided.

@maliming maliming added this to the 8.1-preview milestone Nov 24, 2023
@maliming maliming marked this pull request as ready for review December 12, 2023 09:20
@maliming maliming marked this pull request as draft December 12, 2023 09:20
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

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

Project coverage is 51.48%. Comparing base (60f1823) to head (09cd2a9).
Report is 45 commits behind head on dev.

Files Patch % Lines
...entity.Domain/Volo/Abp/Identity/IdentitySession.cs 0.00% 54 Missing ⚠️
...Identity/MongoDB/MongoIdentitySessionRepository.cs 0.00% 43 Missing ⚠️
...tyFrameworkCore/EfCoreIdentitySessionRepository.cs 0.00% 39 Missing ⚠️
.../WebClientInfo/HttpContextWebClientInfoProvider.cs 0.00% 20 Missing ⚠️
.../Security/Principal/AbpClaimsIdentityExtensions.cs 0.00% 17 Missing ⚠️
...Core/Security/Claims/AbpDynamicClaimsMiddleware.cs 0.00% 16 Missing ⚠️
...ty/AspNetCore/AbpSecurityStampValidatorCallback.cs 0.00% 11 Missing ⚠️
...re/VirtualFileSystem/NullWebContentFileProvider.cs 0.00% 9 Missing ⚠️
...p.Security/Volo/Abp/Users/CurrentUserExtensions.cs 0.00% 8 Missing ⚠️
...entity/AspNetCore/AbpRefreshingPrincipalOptions.cs 0.00% 8 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #18242      +/-   ##
==========================================
- Coverage   51.57%   51.48%   -0.10%     
==========================================
  Files        3098     3106       +8     
  Lines       98540    98847     +307     
  Branches     7878     7897      +19     
==========================================
+ Hits        50823    50890      +67     
- Misses      46152    46395     +243     
+ Partials     1565     1562       -3     

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

@aldhamdy
Copy link

dose this capable of managing session for mobile app scenarios.
ex:
if user logged in from a new device we force him/her for 2FA and save unique id of the device.
next time user logged in from previously registered device, system does not require 2FA.
also need to allow user to only have 1 concurrent session.

Cloud please help how can we implement this strategy.

@maliming
Copy link
Member Author

This is a different business. The session will currently be designed to Prevent concurrent login and manage user sessions

@aldhamdy
Copy link

This is a different business. The session will currently be designed to Prevent concurrent login and manage user sessions

We can use the session history for the user to check if this user has previously succeeded session from the same device then we don't require 2FA.

I think the right module to implement this is the openidconnect, but we need the session entity to store the unique terminal/browser/mobile id.

after that we can edit the token handler in openidconnect to check for existing sessions for the same user & device-id so no need to force 2FA.
Also it will be linked to the same option of 2FA (remember browser).

@maliming maliming modified the milestones: 8.1-preview, 8.2-preview Jan 22, 2024
@maliming maliming marked this pull request as ready for review March 13, 2024 03:23
@maliming maliming marked this pull request as draft March 13, 2024 06:52
@maliming maliming marked this pull request as ready for review March 13, 2024 07:57
@maliming maliming requested a review from EngincanV March 21, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants