blob: 2cb2e5029066a1be48e66b2626424025e02b6e9e (
plain)
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
|
package org.dogtagpki.server.tps.main;
import java.util.ArrayList;
import org.dogtagpki.server.tps.engine.TPSEngine;
import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
public class ExternalRegAttrs {
public String ldapAttrNameTokenType;
public String ldapAttrNameTokenCUID;
public String ldapAttrNameCertsToRecover;
String tokenCUID;
String tokenType;
String tokenUserId;
String tokenMSN;
ArrayList<ExternalRegCertToRecover> certsToRecover;
boolean isDelegation;
public ExternalRegAttrs(String authId) {
String method = "ExternalRegAttrs";
IConfigStore configStore = CMS.getConfigStore();
String configName = null;
try {
configName = "auths.instance." + authId + ".externalReg.tokenTypeAttributeName";
CMS.debug(method + ": getting config: " + configName);
ldapAttrNameTokenType = configStore.getString(configName,
"tokenType");
configName = "auths.instance." + authId + ".externalReg.cuidAttributeName";
CMS.debug(method + ": getting config: " + configName);
ldapAttrNameTokenCUID = configStore.getString(configName,
"tokenCUID");
configName = "auths.instance." + authId + ".externalReg.certs.recoverAttributeName";
CMS.debug(method + ": getting config: " + configName);
ldapAttrNameCertsToRecover = configStore.getString(configName,
"certsToRecover");
String RH_Delegation_Cfg = TPSEngine.CFG_EXTERNAL_REG + "." +
TPSEngine.CFG_ER_DELEGATION + ".enable";
isDelegation = configStore.getBoolean(RH_Delegation_Cfg, false);
} catch (EBaseException e) {
CMS.debug("ExternalRegAttrs: unable to obtain certain config values. Default to be used");
}
certsToRecover = new ArrayList<ExternalRegCertToRecover>();
}
public void setTokenType(String type) {
tokenType = type;
}
public String getTokenType() {
return tokenType;
}
public void setTokenCUID(String cuid) {
tokenCUID = cuid;
}
public String getTokenCUID() {
return tokenCUID;
}
public void setTokenUserId(String uid) {
tokenUserId = uid;
}
public String getTokenUserId() {
return tokenUserId;
}
public void setTokenMSN(String msn) {
tokenMSN = msn;
}
public String getTokenMSN() {
return tokenMSN;
}
public int getCertsToRecoverCount()
{
return certsToRecover.size();
}
public void addCertToRecover(ExternalRegCertToRecover cert)
{
certsToRecover.add(cert);
}
public ArrayList<ExternalRegCertToRecover> getCertsToRecover() {
return certsToRecover;
}
public void setIsDelegation(boolean isDelegation) {
this.isDelegation = isDelegation;
}
public boolean getIsDelegation() {
return isDelegation;
}
}
|