1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.athenz.identityprovider.api;
import com.yahoo.vespa.athenz.api.AthenzService;
import java.net.URI;
import java.time.Instant;
import java.util.Set;
/**
* A signed identity document which contains a {@link IdentityDocument}
*
* @author bjorncs
*/
public class SignedIdentityDocument {
public static final int DEFAULT_KEY_VERSION = 0;
public static final int DEFAULT_DOCUMENT_VERSION = 1;
private final IdentityDocument identityDocument;
private final String signature;
private final int signingKeyVersion;
private final VespaUniqueInstanceId providerUniqueId;
private final String dnsSuffix;
private final AthenzService providerService;
private final URI ztsEndpoint;
private final int documentVersion;
private final String configServerHostname;
private final String instanceHostname;
private final Instant createdAt;
private final Set<String> ipAddresses;
private final IdentityType identityType;
public SignedIdentityDocument(IdentityDocument identityDocument,
String signature,
int signingKeyVersion,
VespaUniqueInstanceId providerUniqueId,
String dnsSuffix,
AthenzService providerService,
URI ztsEndpoint,
int documentVersion,
String configServerHostname,
String instanceHostname,
Instant createdAt,
Set<String> ipAddresses,
IdentityType identityType) {
this.identityDocument = identityDocument;
this.signature = signature;
this.signingKeyVersion = signingKeyVersion;
this.providerUniqueId = providerUniqueId;
this.dnsSuffix = dnsSuffix;
this.providerService = providerService;
this.ztsEndpoint = ztsEndpoint;
this.documentVersion = documentVersion;
this.configServerHostname = configServerHostname;
this.instanceHostname = instanceHostname;
this.createdAt = createdAt;
this.ipAddresses = ipAddresses;
this.identityType = identityType;
}
public IdentityDocument identityDocument() {
return identityDocument;
}
public String signature() {
return signature;
}
public int signingKeyVersion() {
return signingKeyVersion;
}
public VespaUniqueInstanceId providerUniqueId() {
return providerUniqueId;
}
public String dnsSuffix() {
return dnsSuffix;
}
public AthenzService providerService() {
return providerService;
}
public URI ztsEndpoint() {
return ztsEndpoint;
}
public int documentVersion() {
return documentVersion;
}
public String configServerHostname() {
return configServerHostname;
}
public String instanceHostname() {
return instanceHostname;
}
public Instant createdAt() {
return createdAt;
}
public Set<String> ipAddresses() {
return ipAddresses;
}
public IdentityType identityType() {
return identityType;
}
}
|