2

我正在使用 OpenID Connect 和 OAuth 2.0 直接针对 AD FS 4.0 对用户进行身份验证和授权。我将我的 Angular + ASP.NET Core 应用程序作为 Native 和 Wep API 应用程序添加到应用程序组。如果我在 AD 中更改用户密码,用户将仅在 1 小时内重定向到登录页面。在几分钟内更改密码时,我需要将用户重定向到登录页面。

为此,我在 AdfsWebApiApplication 属性中将 TokenLifetime(访问令牌生命周期)从 60 分钟减少到 2 分钟。每 2 分钟检查一次刷新令牌,但尽管更改了密码,但没有发生重定向。用户在 60 分钟内仍被重定向到登录页面。我还尝试在 AdfsProperties 中将 SSOLifetime 减少到 5 分钟,但在这种情况下,无论密码更改状态如何,用户都会每 5 分钟被重定向到登录页面。

获取 AdfsWebApiApplication:

AccessControlPolicyName              : Permit everyone
AccessControlPolicyParameters        : 
AdditionalAuthenticationRules        : 
AllowedAuthenticationClassReferences : {}
AllowedClientTypes                   : Public, Confidential
ApplicationGroupIdentifier           : MyApp
AlwaysRequireAuthentication          : False
ClaimsProviderName                   : {}
DelegationAuthorizationRules         : 
Enabled                              : True
ImpersonationAuthorizationRules      : 
IssuanceAuthorizationRules           : 
IssueOAuthRefreshTokensTo            : AllDevices
IssuanceTransformRules               : ...


NotBeforeSkew                        : 0
Description                          : 
PublishedThroughProxy                : False
RefreshTokenProtectionEnabled        : False
RequestMFAFromClaimsProviders        : False
ResultantPolicy                      : RequireFreshAuthentication:False
                                       IssuanceAuthorizationRules:
                                       {
                                         Permit everyone
                                       }
TokenLifetime                        : 2

获取 AdfsProperties:

AddProxyAuthorizationRules                 : ...
ArtifactDbConnection                       :....
AuditLevel                                 : {Basic}
AutoCertificateRollover                    : True
CertificateCriticalThreshold               : 2
CertificateDuration                        : 365
CertificateGenerationThreshold             : 20
CertificatePromotionThreshold              : 5
CertificateRolloverInterval                : 720
CertificateSharingContainer                : 
CertificateThresholdMultiplier             : 1440
ClientCertRevocationCheck                  : None
ContactPerson                              : Microsoft.IdentityServer.Management.Resources.ContactPerson
DisplayName                                : login
IntranetUseLocalClaimsProvider             : False
ExtendedProtectionTokenCheck               : Allow
FederationPassiveAddress                   : /adfs/ls/
HostName                                   : login
HttpPort                                   : 80
HttpsPort                                  : 443
TlsClientPort                              : 49443
Identifier                                 : <identifier>
IdTokenIssuer                              : <issuer>
InstalledLanguage                          : en-US
LogLevel                                   : {Errors, FailureAudits, Information, Verbose...}
MonitoringInterval                         : 1440
NetTcpPort                                 : 1501
NtlmOnlySupportedClientAtProxy             : False
OrganizationInfo                           : 
PreventTokenReplays                        : False
ProxyTrustTokenLifetime                    : 21600
ReplayCacheExpirationInterval              : 60
SignedSamlRequestsRequired                 : False
SamlMessageDeliveryWindow                  : 5
SignSamlAuthnRequests                      : False
SsoLifetime                                : 480
PersistentSsoLifetimeMins                  : 129600
KmsiLifetimeMins                           : 1440
PersistentSsoEnabled                       : True
PersistentSsoCutoffTime                    : 01/01/0001 00:00:00
KmsiEnabled                                : False
LoopDetectionEnabled                       : True
LoopDetectionTimeIntervalInSeconds         : 20
LoopDetectionMaximumTokensIssuedInInterval : 5
PasswordValidationDelayInMinutes           : 60
SendClientRequestIdAsQueryStringParameter  : False
WIASupportedUserAgents                     : {MSAuthHost/1.0/In-Domain, MSIE 6.0, MSIE 7.0, MSIE 8.0...}
BrowserSsoSupportedUserAgents              : {Windows NT 1, Windows Phone 1}
ExtranetLockoutThreshold                   : 2147483647
ExtranetLockoutEnabled                     : False
ExtranetObservationWindow                  : 00:30:00
GlobalRelyingPartyClaimsIssuancePolicy     : ...
ExtranetLockoutRequirePDC                  : True
LocalAuthenticationTypesEnabled            : True
RelayStateForIdpInitiatedSignOnEnabled     : False
BrowserSsoEnabled                          : True
DelegateServiceAdministration              : 
AllowSystemServiceAdministration           : False
AllowLocalAdminsServiceAdministration      : True
CurrentFarmBehavior                        : 3
DeviceUsageWindowInDays                    : 14
EnableIdpInitiatedSignonPage               : False
IgnoreTokenBinding                         : False

我想 PasswordValidationDelayInMinutes = 60 对此负责。但我无法使用 Set-AdfsProperties 命令更改此参数。

如何在 2 分钟内将用户重定向到登录页面?

4

1 回答 1

0

2分钟后应用。令牌超时 - 进入 ADFS - 令牌未超时,因为它是 5 分钟,所以铸造了新令牌。

所以 ADFS 超时需要小于 app. 暂停。

于 2019-10-28T19:18:07.100 回答