Skip to content

Commit 9a73225

Browse files
author
FusionAuth Automation
committed
Sync from monorepo 8ac7a9897077
1 parent 6e710e2 commit 9a73225

15 files changed

Lines changed: 293 additions & 4 deletions

fusionauth-netcore-client/domain/io/fusionauth/domain/AuthenticationThreats.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ namespace io.fusionauth.domain
2525
* @author Brett Pontarelli
2626
*/
2727
public enum AuthenticationThreats {
28-
ImpossibleTravel
28+
BotDetected,
29+
BlocklistedIp,
30+
DormantAccount,
31+
DormantPassword,
32+
ImpossibleTravel,
33+
RecentIdentityChange,
34+
RecentPasswordChange,
35+
SuspiciousUserAgent,
36+
UnrecognizedDevice,
37+
UntrustedDevice
2938
}
3039
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright (c) 2018-2026, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
15+
*/
16+
17+
18+
using System.Collections.Generic;
19+
using System;
20+
21+
namespace io.fusionauth.domain
22+
{
23+
24+
/**
25+
* Flags to enable or disable specific risk signals that contribute to the composite client risk calculation.
26+
*/
27+
public class ClientRiskConfiguration: Enableable {
28+
29+
public bool? blocklistedIp;
30+
31+
public bool? botDetected;
32+
33+
public bool? dormantAccount;
34+
35+
public bool? dormantPassword;
36+
37+
public bool? impossibleTravel;
38+
39+
public bool? recentIdentityChange;
40+
41+
public bool? recentPasswordChange;
42+
43+
public bool? suspiciousUserAgent;
44+
45+
public bool? unrecognizedDevice;
46+
47+
public bool? untrustedDevice;
48+
49+
public ClientRiskConfiguration with(Action<ClientRiskConfiguration> action) {
50+
action(this);
51+
return this;
52+
}
53+
}
54+
}

fusionauth-netcore-client/domain/io/fusionauth/domain/MultiFactorLoginPolicy.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ namespace io.fusionauth.domain
2525
* @author Daniel DeGroff
2626
*/
2727
public enum MultiFactorLoginPolicy {
28+
ChallengeOnHighRisk,
29+
ChallengeOnMediumRisk,
2830
Disabled,
2931
Enabled,
3032
Required

fusionauth-netcore-client/domain/io/fusionauth/domain/Tenant.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public class Tenant {
3535

3636
public TenantCaptchaConfiguration captchaConfiguration;
3737

38+
public ClientRiskConfiguration clientRiskConfiguration;
39+
3840
public bool? configured;
3941

4042
public List<ConnectorPolicy> connectorPolicies;

fusionauth-netcore-client/domain/io/fusionauth/domain/TenantMultiFactorConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class TenantMultiFactorConfiguration {
2828

2929
public MultiFactorAuthenticatorMethod authenticator;
3030

31+
public bool? debug;
32+
3133
public MultiFactorEmailMethod email;
3234

3335
public MultiFactorLoginPolicy loginPolicy;

fusionauth-netcore-client/domain/io/fusionauth/domain/api/BaseLoginRequest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class BaseLoginRequest: BaseEventRequest {
2929

3030
public Guid? applicationId;
3131

32+
public double? botDetectionScore;
33+
3234
public string ipAddress;
3335

3436
public MetaData metaData;

fusionauth-netcore-client/domain/io/fusionauth/domain/event/EventType.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ public enum EventType {
9898
UserLoginSuccess,
9999
[EnumMember(Value = "user.login.suspicious")]
100100
UserLoginSuspicious,
101+
[EnumMember(Value = "user.two-factor.challenge")]
102+
UserTwoFactorChallenge,
101103
[EnumMember(Value = "user.password.breach")]
102104
UserPasswordBreach,
103105
[EnumMember(Value = "user.password.reset.send")]
@@ -137,6 +139,10 @@ public enum EventType {
137139
[EnumMember(Value = "user.identity.verified")]
138140
UserIdentityVerified,
139141
[EnumMember(Value = "user.identity.update")]
140-
UserIdentityUpdate
142+
UserIdentityUpdate,
143+
[EnumMember(Value = "user.two-factor.failed-attempt")]
144+
UserTwoFactorFailedAttempt,
145+
[EnumMember(Value = "user.two-factor.success")]
146+
UserTwoFactorSuccess
141147
}
142148
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2018-2026, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
15+
*/
16+
17+
18+
using System.Collections.Generic;
19+
using System;
20+
21+
namespace io.fusionauth.domain.@event
22+
{
23+
24+
/**
25+
* Models the User Two Factor Challenge Event. Fired when a two-factor challenge is started (before the user submits a code).
26+
*/
27+
public class UserTwoFactorChallengeEvent: BaseUserEvent {
28+
29+
public Guid? applicationId;
30+
31+
public string clientRisk;
32+
33+
public UserTwoFactorChallengeEvent with(Action<UserTwoFactorChallengeEvent> action) {
34+
action(this);
35+
return this;
36+
}
37+
}
38+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2018-2026, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
15+
*/
16+
17+
18+
using System.Collections.Generic;
19+
using System;
20+
21+
namespace io.fusionauth.domain.@event
22+
{
23+
24+
/**
25+
* Models the User Two Factor Failed Attempt Event. Fired when a user fails a two-factor challenge.
26+
*/
27+
public class UserTwoFactorFailedAttemptEvent: BaseUserEvent {
28+
29+
public Guid? applicationId;
30+
31+
public string clientRisk;
32+
33+
public string messageType;
34+
35+
public string method;
36+
37+
public UserTwoFactorFailedAttemptEvent with(Action<UserTwoFactorFailedAttemptEvent> action) {
38+
action(this);
39+
return this;
40+
}
41+
}
42+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2018-2026, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
15+
*/
16+
17+
18+
using System.Collections.Generic;
19+
using System;
20+
21+
namespace io.fusionauth.domain.@event
22+
{
23+
24+
/**
25+
* Models the User Two Factor Success Event. Fired when a user successfully completes a two-factor challenge.
26+
*/
27+
public class UserTwoFactorSuccessEvent: BaseUserEvent {
28+
29+
public Guid? applicationId;
30+
31+
public string clientRisk;
32+
33+
public string messageType;
34+
35+
public string method;
36+
37+
public UserTwoFactorSuccessEvent with(Action<UserTwoFactorSuccessEvent> action) {
38+
action(this);
39+
return this;
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)