Skip to content

Commit

Permalink
Ensure password expiration really is optional
Browse files Browse the repository at this point in the history
Fix: #97
  • Loading branch information
io7m committed Dec 16, 2023
1 parent 38c796d commit c2b5bd8
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public IdC1Configuration(
final BTElementParsingContextType context)
{
this.telemetry = Optional.empty();
this.passwords = new IdServerPasswordExpirationConfiguration(
Optional.empty(),
Optional.empty()
);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public void testConfig2()
assertTrue(ot.traces().isPresent());
}

@Test
public void testConfig3()
throws Exception
{
this.roundTrip("server-config-3.xml");
}

private IdServerConfiguration roundTrip(
final String name)
throws Exception
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Configuration xmlns="urn:com.io7m.idstore:configuration:1" xmlns:tls="urn:com.io7m.idstore.tls:1">

<Branding ProductTitle="idstore"/>

<Database Kind="POSTGRESQL"
Name="postgres"
OwnerRoleName="postgres"
OwnerRolePassword="12345678"
WorkerRolePassword="1234abcd"
Address="localhost"
Port="54322"
Create="true"
Upgrade="true"/>

<HTTPServices>
<HTTPServiceAdminAPI ListenAddress="localhost"
ListenPort="51000"
ExternalURI="http://localhost:51000/">
<tls:TLSDisabled/>
</HTTPServiceAdminAPI>
<HTTPServiceUserAPI ListenAddress="localhost"
ListenPort="50000"
ExternalURI="http://localhost:50000/">
<tls:TLSDisabled/>
</HTTPServiceUserAPI>
<HTTPServiceUserView ListenAddress="localhost"
ListenPort="50001"
ExternalURI="http://localhost:50001/">
<tls:TLSDisabled/>
</HTTPServiceUserView>
</HTTPServices>

<History UserLoginHistoryLimit="100"
AdminLoginHistoryLimit="10000"/>

<Mail SenderAddress="[email protected]"
VerificationExpiration="PT24H">
<SMTP Host="mail.example.com"
Port="25"/>
</Mail>

<OpenTelemetry LogicalServiceName="idstore">
<Metrics Endpoint="http://metrics.example.com:4317"
Protocol="GRPC"/>
<Traces Endpoint="http://traces.example.com:4317"
Protocol="GRPC"/>
</OpenTelemetry>

<RateLimiting EmailVerificationRateLimit="PT10M"
PasswordResetRateLimit="PT10M"/>

<Sessions UserSessionExpiration="PT30M"
AdminSessionExpiration="PT30M"/>

</Configuration>

0 comments on commit c2b5bd8

Please sign in to comment.