Skip to content

Commit

Permalink
Remove call to openstack to get all instance IPs on admin page (perf …
Browse files Browse the repository at this point in the history
…improvement). Add request logging. Log authentication results as info.
  • Loading branch information
stuartcaunt committed Nov 26, 2024
1 parent 411ccd6 commit 8c1a83d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions visa-core/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ quarkus:
host: ${VISA_SERVER_HOST:localhost}
test-port: 8081
test-ssl-port: 8446
access-log:
enabled: ${VISA_LOGGING_ACCESS_LOG_ENABLED:true}
cors:
~: true
origins: ${VISA_CORS_ORIGIN:*}
Expand Down Expand Up @@ -61,7 +63,7 @@ quarkus:
level: ${VISA_LOGGING_SYSLOG_THRESHOLD:INFO}
truncate: false
category:
"eu.ill":
"eu.ill.visa":
level: ${VISA_LOGGING_LEVEL:INFO}
"org.apache.guacamole":
level: INFO
Expand Down Expand Up @@ -101,7 +103,7 @@ business:
staffMaxInactivityDurationHours: ${VISA_INSTANCE_STAFF_MAX_INACTIVITY_DURATION_HOURS:192}
defaultUserInstanceQuota: ${VISA_INSTANCE_USER_DEFAULT_QUOTA:2}
activityRetentionPeriodDays: ${VISA_INSTANCE_ACTIVITY_RETENTION_PERIOD_DAYS:0}
portCheckTimeoutMs: ${VISA_INSTANCE_PORT_CHECK_TIMEOUT_MS:1000}
portCheckTimeoutMs: ${VISA_INSTANCE_PORT_CHECK_TIMEOUT_MS:2000}
mailer:
rootURL: ${VISA_ROOT_URL}
enabled: ${VISA_NOTIFICATION_EMAIL_ADAPTER_ENABLED:false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Optional<AccountToken> authenticate(final String token) {
logger.warn("[Token] User {} with login {} has an invalid user id (0)", user.getFullName(), accountToken.getName());

} else {
logger.debug("[Token] Successfully authenticated user: {} ({})", accountToken.getName(), user.getId());
logger.info("[Token] Successfully authenticated user: {} ({})", accountToken.getName(), user.getId());
}

return Optional.of(accountToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class InstanceType {
private final @NotNull Long id;
private final @NotNull String uid;
private final @NotNull String name;
private final String ipAddress;
private final String comments;
private final @NotNull InstanceState state;
private final PlanType plan;
Expand All @@ -33,6 +34,7 @@ public InstanceType(final Instance instance) {
this.id = instance.getId();
this.uid = instance.getUid();
this.name = instance.getName();
this.ipAddress = instance.getIpAddress();
this.comments = instance.getComments();
this.state = instance.getState();
this.plan = new PlanType(instance.getPlan());
Expand All @@ -58,6 +60,10 @@ public String getName() {
return name;
}

public String getIpAddress() {
return ipAddress;
}

public String getComments() {
return comments;
}
Expand Down

0 comments on commit 8c1a83d

Please sign in to comment.