feat(iam): model signing certificates (#5024)

UploadSigningCertificate, ListSigningCertificates, UpdateSigningCertificate
and DeleteSigningCertificate, stored per user with the documented quota of
two and account-wide duplicate detection compared on the encoded form.

The body is parsed on upload, because MalformedCertificate cannot be
answered without reading it. Status accepts Active, Inactive and Expired:
the API Reference gives all three as valid values even though the
parameter's prose explains only the first two. UserName is optional on
every operation and resolves from the access key that signed the request.

A certificate blocks DeleteUser until it is removed, which AWS lists as a
prerequisite, and follows the user across an UpdateUser rename rather than
being stranded on a name that no longer exists. The credential report's
cert_1 and cert_2 columns are backed by the store instead of always
reporting FALSE, reporting N/A for the rotation date unless the
certificate is Active, as the User Guide defines them.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-10-03 15:46:37 -05:00
1 parent f074dd3c40
commit 290f952cb1
13 files changed
+1344 -25

No files matched your search

@@ -118,7 +118,9 @@ public class AwsQueryController {
"TagServerCertificate", "UntagServerCertificate", "ListServerCertificateTags",
"CreateVirtualMFADevice", "DeleteVirtualMFADevice", "ListVirtualMFADevices",
"EnableMFADevice", "DeactivateMFADevice", "ResyncMFADevice", "ListMFADevices",
"TagMFADevice", "UntagMFADevice", "ListMFADeviceTags"
"TagMFADevice", "UntagMFADevice", "ListMFADeviceTags",
"UploadSigningCertificate", "ListSigningCertificates",
"UpdateSigningCertificate", "DeleteSigningCertificate"
);
private static final Set<String> AUTOSCALING_ACTIONS = Set.of(
@@ -15,6 +15,7 @@ import io.github.hectorvent.floci.services.iam.model.OpenIDConnectProvider;
import io.github.hectorvent.floci.services.iam.model.PolicyVersion;
import io.github.hectorvent.floci.services.iam.model.SAMLProvider;
import io.github.hectorvent.floci.services.iam.model.ServerCertificate;
import io.github.hectorvent.floci.services.iam.model.SigningCertificate;
import io.github.hectorvent.floci.services.iam.model.ServiceLastAccessedEntity;
import io.github.hectorvent.floci.services.iam.model.ServiceLastAccessedJob;
import io.github.hectorvent.floci.services.iam.model.VirtualMfaDevice;
@@ -91,6 +92,10 @@ public class IamQueryHandler {
case "DeleteUser" -> handleDeleteUser(params);
case "ListUsers" -> handleListUsers(params);
case "UpdateUser" -> handleUpdateUser(params);
case "UploadSigningCertificate" -> handleUploadSigningCertificate(params, authorization);
case "ListSigningCertificates" -> handleListSigningCertificates(params, authorization);
case "UpdateSigningCertificate" -> handleUpdateSigningCertificate(params, authorization);
case "DeleteSigningCertificate" -> handleDeleteSigningCertificate(params, authorization);
case "TagUser" -> handleTagUser(params);
case "UntagUser" -> handleUntagUser(params);
case "ListUserTags" -> handleListUserTags(params);
@@ -751,6 +756,63 @@ public class IamQueryHandler {
return Response.ok(AwsQueryResponse.envelope("ListServerCertificates", AwsNamespaces.IAM, xml.build())).build();
}
/**
* UserName is optional on every signing-certificate operation: the model says it is determined
* implicitly from the access key that signed the request.
*/
private Response handleUploadSigningCertificate(MultivaluedMap<String, String> params,
String authorization) {
SigningCertificate certificate = iamService.uploadSigningCertificate(
resolveUserName(params, authorization), getParam(params, "CertificateBody"));
XmlBuilder xml = new XmlBuilder()
.start("Certificate").raw(signingCertificateXml(certificate)).end("Certificate");
return Response.ok(AwsQueryResponse.envelope("UploadSigningCertificate",
AwsNamespaces.IAM, xml.build())).build();
}
private Response handleListSigningCertificates(MultivaluedMap<String, String> params,
String authorization) {
Page<SigningCertificate> page = paginate(
iamService.listSigningCertificates(resolveUserName(params, authorization)), params);
XmlBuilder xml = new XmlBuilder().start("Certificates");
for (SigningCertificate certificate : page.items()) {
xml.start("member").raw(signingCertificateXml(certificate)).end("member");
}
xml.end("Certificates").elem("IsTruncated", page.truncated());
if (page.marker() != null) {
xml.elem("Marker", page.marker());
}
return Response.ok(AwsQueryResponse.envelope("ListSigningCertificates",
AwsNamespaces.IAM, xml.build())).build();
}
private Response handleUpdateSigningCertificate(MultivaluedMap<String, String> params,
String authorization) {
iamService.updateSigningCertificate(resolveUserName(params, authorization),
requireParam(params, "CertificateId"), getParam(params, "Status"));
return Response.ok(AwsQueryResponse.envelopeNoResult("UpdateSigningCertificate",
AwsNamespaces.IAM)).build();
}
private Response handleDeleteSigningCertificate(MultivaluedMap<String, String> params,
String authorization) {
iamService.deleteSigningCertificate(resolveUserName(params, authorization),
requireParam(params, "CertificateId"));
return Response.ok(AwsQueryResponse.envelopeNoResult("DeleteSigningCertificate",
AwsNamespaces.IAM)).build();
}
/** The four members the model marks required, plus UploadDate. */
private String signingCertificateXml(SigningCertificate certificate) {
return new XmlBuilder()
.elem("UserName", certificate.getUserName())
.elem("CertificateId", certificate.getCertificateId())
.elem("CertificateBody", certificate.getCertificateBody())
.elem("Status", certificate.getStatus())
.elem("UploadDate", isoDate(certificate.getUploadDate()))
.build();
}
private Response handleTagServerCertificate(MultivaluedMap<String, String> params) {
iamService.tagServerCertificate(getParam(params, "ServerCertificateName"), extractTags(params, false));
return Response.ok(AwsQueryResponse.envelopeNoResult("TagServerCertificate", AwsNamespaces.IAM)).build();
@@ -31,6 +31,7 @@ import io.github.hectorvent.floci.services.iam.model.OrganizationRootFeatures;
import io.github.hectorvent.floci.services.iam.model.PolicyVersion;
import io.github.hectorvent.floci.services.iam.model.CallerContext;
import io.github.hectorvent.floci.services.iam.model.ServerCertificate;
import io.github.hectorvent.floci.services.iam.model.SigningCertificate;
import io.github.hectorvent.floci.services.iam.model.SessionCredential;
import io.github.hectorvent.floci.services.iam.model.VirtualMfaDevice;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -44,10 +45,12 @@ import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.PrivateKey;
import java.security.SecureRandom;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
import java.time.Duration;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.Base64;
import java.util.Comparator;
import java.util.Optional;
@@ -143,6 +146,17 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
* the maximum it can be raised to, so this is a real ceiling rather than a default.
*/
private static final int MAX_SERVER_CERTIFICATES = 20;
/** IAM User Guide quota table, and GetAccountSummary's SigningCertificatesPerUserQuota. */
private static final int MAX_SIGNING_CERTIFICATES_PER_USER = 2;
/** certificateIdType is 24 to 128 of [\w]+, so a 32-character id sits inside that. */
private static final int SIGNING_CERTIFICATE_ID_LENGTH = 32;
private static final String SIGNING_CERTIFICATE_ACTIVE = "Active";
/**
* UpdateSigningCertificate's Status, whose documented valid values are Active, Inactive and
* Expired. The prose explains only the first two, so the third is easy to reject by mistake.
*/
private static final Set<String> SIGNING_CERTIFICATE_STATUSES =
Set.of(SIGNING_CERTIFICATE_ACTIVE, "Inactive", "Expired");
/** {@code certificateBodyType} and {@code privateKeyType} are both 1 to 16384 characters. */
private static final int MAX_CERTIFICATE_BODY_LENGTH = 16384;
/** {@code certificateChainType} is far larger, at 1 to 2097152. */
@@ -217,12 +231,14 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
private final StorageBackend<String, VirtualMfaDevice> virtualMfaDevices;
/** Server certificates, keyed by name, which is unique within the account. */
private final StorageBackend<String, ServerCertificate> serverCertificates;
private final StorageBackend<String, SigningCertificate> signingCertificates;
/**
* Guards the check-then-write on a server certificate. Upload checks the name is free before
* storing, and UpdateServerCertificate checks a new name is free before moving to it, so two
* requests racing the same name would otherwise both pass the check.
*/
private final Object serverCertificateLock = new Object();
private final Object signingCertificateLock = new Object();
/**
* Guards every check-then-write on an MFA device. Assignment is the reason it has to exist:
* EnableMFADevice reads the device to confirm it is unassigned and reads the user's device
@@ -264,6 +280,7 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
storageFactory.create("iam", "iam-credential-reports.json", new TypeReference<>() {}),
storageFactory.create("iam", "iam-virtual-mfa-devices.json", new TypeReference<>() {}),
storageFactory.create("iam", "iam-server-certificates.json", new TypeReference<>() {}),
storageFactory.create("iam", "iam-signing-certificates.json", new TypeReference<>() {}),
regionResolver,
config.services().iam().seedDeployerPrincipal(),
config.services().iam().accountAlias().orElse(null)
@@ -294,6 +311,7 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(),
new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(),
new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(),
new InMemoryStorage<>(),
regionResolver, seedDeployerPrincipal, null);
}
@@ -316,8 +334,8 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
this(users, groups, roles, policies, accessKeys, instanceProfiles, sessions,
accountAliases, passwordPolicies, new InMemoryStorage<>(), oidcProviders,
serviceLinkedRoleDeletions, new InMemoryStorage<>(), new InMemoryStorage<>(),
new InMemoryStorage<>(), new InMemoryStorage<>(), regionResolver,
seedDeployerPrincipal, seededAccountAlias);
new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(),
regionResolver, seedDeployerPrincipal, seededAccountAlias);
}
// 9-backend constructor (no alias/OIDC/SLR backends): kept for existing callers/tests;
@@ -337,6 +355,7 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
new InMemoryStorage<>(), passwordPolicies, new InMemoryStorage<>(),
new InMemoryStorage<>(), new InMemoryStorage<>(), orgRootFeatures,
new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(),
new InMemoryStorage<>(),
regionResolver, seedDeployerPrincipal, null);
}
@@ -356,6 +375,7 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
StorageBackend<String, CredentialReport> credentialReports,
StorageBackend<String, VirtualMfaDevice> virtualMfaDevices,
StorageBackend<String, ServerCertificate> serverCertificates,
StorageBackend<String, SigningCertificate> signingCertificates,
RegionResolver regionResolver,
boolean seedDeployerPrincipal,
String seededAccountAlias) {
@@ -375,6 +395,7 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
this.credentialReports = credentialReports;
this.virtualMfaDevices = virtualMfaDevices;
this.serverCertificates = serverCertificates;
this.signingCertificates = signingCertificates;
this.regionResolver = regionResolver;
this.seedDeployerPrincipal = seedDeployerPrincipal;
this.seededAccountAlias = seededAccountAlias;
@@ -549,14 +570,22 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
throw new AwsException("DeleteConflict",
"Cannot delete entity, must delete access keys first.", 409);
}
// Held across the delete, not just the check: EnableMFADevice confirms the user under this
// same lock, so the two cannot interleave into a device assigned to a deleted user.
synchronized (mfaDeviceLock) {
if (!mfaDevicesForUser(userName).isEmpty()) {
// Both locks are held across the delete rather than just the checks: UploadSigningCertificate
// and EnableMFADevice confirm the user under their own lock, so neither can interleave into
// a credential owned by a deleted user. Taken in this order, and nowhere else in both, so
// the nesting cannot deadlock.
synchronized (signingCertificateLock) {
if (!userSigningCertificates(userName).isEmpty()) {
throw new AwsException("DeleteConflict",
"Cannot delete entity, must deactivate MFA device first.", 409);
"Cannot delete entity, must delete signing certificates first.", 409);
}
synchronized (mfaDeviceLock) {
if (!mfaDevicesForUser(userName).isEmpty()) {
throw new AwsException("DeleteConflict",
"Cannot delete entity, must deactivate MFA device first.", 409);
}
users.delete(userName);
}
users.delete(userName);
}
LOG.infov("Deleted IAM user: {0}", userName);
}
@@ -594,22 +623,31 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
"User with name " + newUserName + " already exists.", 409);
}
List<AccessKey> keysToMove = userAccessKeys(userName);
// The rename publishes the user under its new name and moves its MFA devices to
// match. Both happen under the MFA lock, because DeleteUser checks for devices and
// removes the user under that same lock: split across it, a DeleteUser for the new
// name could land after the user is published but before the devices follow, see
// none, and delete a user whose device is about to be reassigned to it.
synchronized (mfaDeviceLock) {
users.delete(userName);
user.setUserName(newUserName);
if (newPath != null) {
user.setPath(normalizePath(newPath));
// The rename publishes the user under its new name and moves the credentials that
// DeleteUser refuses to delete a user over: its MFA devices and its signing
// certificates. Each moves under the lock DeleteUser checks it with, because split
// across that lock a DeleteUser for the new name could land after the user is
// published but before the credential follows, see none, and delete a user whose
// credential is about to be reassigned to it. The two locks are taken in the same
// order DeleteUser takes them, so the nesting cannot deadlock.
synchronized (signingCertificateLock) {
List<SigningCertificate> certificatesToMove = userSigningCertificates(userName);
synchronized (mfaDeviceLock) {
users.delete(userName);
user.setUserName(newUserName);
if (newPath != null) {
user.setPath(normalizePath(newPath));
}
user.setArn(iamArnBeside(user.getArn(), "user", user.getPath(), newUserName));
users.put(newUserName, user);
for (VirtualMfaDevice device : mfaDevicesForUser(userName)) {
device.setUserName(newUserName);
virtualMfaDevices.put(device.getSerialNumber(), device);
}
}
user.setArn(iamArnBeside(user.getArn(), "user", user.getPath(), newUserName));
users.put(newUserName, user);
for (VirtualMfaDevice device : mfaDevicesForUser(userName)) {
device.setUserName(newUserName);
virtualMfaDevices.put(device.getSerialNumber(), device);
for (SigningCertificate certificate : certificatesToMove) {
certificate.setUserName(newUserName);
signingCertificates.put(certificate.getCertificateId(), certificate);
}
}
loginProfiles.get(userName).ifPresent(profile -> {
@@ -2290,6 +2328,133 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
return getServerCertificate(name).getTags();
}
// Signing certificates
// =========================================================================
/**
* Stores an uploaded X.509 signing certificate against a user. The body is really parsed, so a
* caller cannot store something unusable: the model defines MalformedCertificate on this
* operation and it cannot be answered without reading the material.
*
* <p>Unlike a server certificate there is no private key and no name. The generated
* {@code CertificateId} is the handle, and its status starts as {@code Active}.
*/
public SigningCertificate uploadSigningCertificate(String userName, String certificateBody) {
if (certificateBody == null || certificateBody.isBlank()) {
throw new AwsException("ValidationError",
"The request must contain the parameter CertificateBody.", 400);
}
checkMaterialLength(certificateBody, "CertificateBody", MAX_CERTIFICATE_BODY_LENGTH);
X509Certificate parsed = parseUploadedCertificate(certificateBody, "CertificateBody");
synchronized (signingCertificateLock) {
// Confirmed under the lock, not before it: DeleteUser checks for certificates holding
// the same lock, so the two cannot interleave into a certificate owned by a user that
// no longer exists.
getUser(userName);
// Counted inside the lock with the write, so two concurrent uploads cannot both see
// room for one more.
if (userSigningCertificates(userName).size() >= MAX_SIGNING_CERTIFICATES_PER_USER) {
throw new AwsException("LimitExceeded",
"Cannot exceed quota for SigningCertificatesPerUser: "
+ MAX_SIGNING_CERTIFICATES_PER_USER, 409);
}
// The model's DuplicateCertificate is account-wide, not per user: "the same
// certificate is associated with an IAM user in the account".
if (storedSigningCertificateMatching(parsed)) {
throw new AwsException("DuplicateCertificate",
"The same certificate is associated with an IAM user in the account.", 409);
}
SigningCertificate stored = new SigningCertificate();
stored.setUserName(userName);
stored.setCertificateId(randomId(SIGNING_CERTIFICATE_ID_LENGTH));
stored.setCertificateBody(certificateBody);
stored.setStatus(SIGNING_CERTIFICATE_ACTIVE);
stored.setUploadDate(Instant.now());
signingCertificates.put(stored.getCertificateId(), stored);
LOG.infov("Uploaded signing certificate {0} for user {1}",
stored.getCertificateId(), userName);
return stored;
}
}
public List<SigningCertificate> listSigningCertificates(String userName) {
getUser(userName); // validates existence
return userSigningCertificates(userName);
}
public void updateSigningCertificate(String userName, String certificateId, String status) {
if (status == null || !SIGNING_CERTIFICATE_STATUSES.contains(status)) {
throw new AwsException("ValidationError",
"Value '" + status + "' at 'status' failed to satisfy constraint: Member must "
+ "satisfy enum value set: [" + String.join(", ",
SIGNING_CERTIFICATE_STATUSES) + "]", 400);
}
synchronized (signingCertificateLock) {
SigningCertificate certificate = userSigningCertificate(userName, certificateId);
certificate.setStatus(status);
signingCertificates.put(certificate.getCertificateId(), certificate);
}
}
public void deleteSigningCertificate(String userName, String certificateId) {
synchronized (signingCertificateLock) {
SigningCertificate certificate = userSigningCertificate(userName, certificateId);
signingCertificates.delete(certificate.getCertificateId());
}
}
/**
* The user's certificate of that id. A certificate belonging to another user is reported as
* missing rather than as a permission problem, the way an access key of another user is.
*/
private SigningCertificate userSigningCertificate(String userName, String certificateId) {
getUser(userName); // validates existence
SigningCertificate certificate = signingCertificates.get(certificateId)
.orElseThrow(() -> new AwsException("NoSuchEntity",
"The Signing Certificate with id " + certificateId
+ " cannot be found.", 404));
if (!userName.equals(certificate.getUserName())) {
throw new AwsException("NoSuchEntity",
"The Signing Certificate with id " + certificateId
+ " cannot be found.", 404);
}
return certificate;
}
private List<SigningCertificate> userSigningCertificates(String userName) {
return signingCertificates.scan(key -> true).stream()
.filter(certificate -> userName.equals(certificate.getUserName()))
.sorted(Comparator.comparing(SigningCertificate::getCertificateId))
.toList();
}
/**
* Whether an equivalent certificate is already stored in this account, compared on the encoded
* form rather than the PEM text so that the same certificate re-wrapped or re-indented still
* counts as the same one.
*/
private boolean storedSigningCertificateMatching(X509Certificate candidate) {
byte[] encoded;
try {
encoded = candidate.getEncoded();
} catch (CertificateEncodingException e) {
// A certificate that just parsed should always re-encode. Treating it as unique is the
// safe direction: it refuses nothing the model accepts.
LOG.debugv("Could not re-encode an uploaded signing certificate: {0}", e.getMessage());
return false;
}
return signingCertificates.scan(key -> true).stream().anyMatch(stored -> {
try {
return Arrays.equals(encoded,
Pem.parseCertificate(stored.getCertificateBody()).getEncoded());
} catch (CertificateMaterialException | CertificateEncodingException e) {
LOG.debugv("Skipping unreadable stored signing certificate {0}: {1}",
stored.getCertificateId(), e.getMessage());
return false;
}
});
}
// Virtual MFA devices
// =========================================================================
@@ -3801,6 +3966,9 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
List<AccessKey> keys = userAccessKeys(user.getUserName());
AccessKey key1 = keys.size() > 0 ? keys.get(0) : null;
AccessKey key2 = keys.size() > 1 ? keys.get(1) : null;
List<SigningCertificate> certificates = userSigningCertificates(user.getUserName());
SigningCertificate cert1 = certificates.size() > 0 ? certificates.get(0) : null;
SigningCertificate cert2 = certificates.size() > 1 ? certificates.get(1) : null;
Optional<LoginProfile> loginProfile = loginProfiles.get(user.getUserName());
boolean passwordEnabled = loginProfile.isPresent();
@@ -3815,7 +3983,8 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
mfaDevicesForUser(user.getUserName()).isEmpty() ? "FALSE" : "TRUE",
accessKeyActiveField(key1), accessKeyRotatedField(key1), "N/A", "N/A", "N/A",
accessKeyActiveField(key2), accessKeyRotatedField(key2), "N/A", "N/A", "N/A",
"FALSE", "N/A", "FALSE", "N/A",
signingCertificateActiveField(cert1), signingCertificateRotatedField(cert1),
signingCertificateActiveField(cert2), signingCertificateRotatedField(cert2),
additionalCredentialsInfoField(keys));
}
@@ -3853,6 +4022,25 @@ public class IamService implements SessionAccountLookup, ResourceProvider {
return profile.getPasswordLastChanged() != null ? profile.getPasswordLastChanged() : profile.getCreateDate();
}
private String signingCertificateActiveField(SigningCertificate certificate) {
return certificate != null && SIGNING_CERTIFICATE_ACTIVE.equals(certificate.getStatus())
? "TRUE" : "FALSE";
}
/**
* The upload date, and {@code N/A} unless the certificate is Active. The User Guide is
* explicit that this column is N/A when the user "does not have an active signing
* certificate", so an Inactive certificate reports no date even though one is stored.
*
* <p>It describes the date the certificate "was created or last changed". Floci records only
* the upload, which is the one of those two it can know: a status change rewrites no material.
*/
private String signingCertificateRotatedField(SigningCertificate certificate) {
return certificate != null
&& SIGNING_CERTIFICATE_ACTIVE.equals(certificate.getStatus())
? isoDate(certificate.getUploadDate()) : "N/A";
}
private String accessKeyActiveField(AccessKey key) {
return key != null && "Active".equals(key.getStatus()) ? "TRUE" : "FALSE";
}
@@ -0,0 +1,38 @@
package io.github.hectorvent.floci.services.iam.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.quarkus.runtime.annotations.RegisterForReflection;
import java.time.Instant;
/**
* An IAM X.509 signing certificate, owned by one IAM user. Unlike a server certificate it has no
* name, no path and no private key: AWS stores only the certificate body, and the generated
* {@code certificateId} is what every later operation addresses it by.
*
* <p>{@code status} is {@code Active} on upload, which is what the model documents.
*/
@RegisterForReflection
@JsonIgnoreProperties(ignoreUnknown = true)
public class SigningCertificate {
private String userName;
private String certificateId;
private String certificateBody;
private String status = "Active";
private Instant uploadDate = Instant.now();
public SigningCertificate() {}
public String getUserName() { return userName; }
public void setUserName(String userName) { this.userName = userName; }
public String getCertificateId() { return certificateId; }
public void setCertificateId(String certificateId) { this.certificateId = certificateId; }
public String getCertificateBody() { return certificateBody; }
public void setCertificateBody(String certificateBody) {
this.certificateBody = certificateBody;
}
public String getStatus() { return status; }
public void setStatus(String status) { this.status = status; }
public Instant getUploadDate() { return uploadDate; }
public void setUploadDate(Instant uploadDate) { this.uploadDate = uploadDate; }
}