summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java29
-rw-r--r--auth/sample/data/identities.dat2
-rw-r--r--auth/sample/data/sample.identities.dat14
3 files changed, 24 insertions, 21 deletions
diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java
index f9cd060b..744c3c3f 100644
--- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java
+++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java
@@ -164,22 +164,25 @@ public class CMService {
} else {
for (String cn : req.value.fqdns) {
- try {
- InetAddress[] ias = InetAddress.getAllByName(cn);
- Set<String> potentialSanNames = new HashSet<>();
- for (InetAddress ia1 : ias) {
- InetAddress ia2 = InetAddress.getByAddress(ia1.getAddress());
- if (primary == null && ias.length == 1 && trans.ip().equals(ia1.getHostAddress())) {
- primary = ia1;
- } else if (!cn.equals(ia1.getHostName())
- && !ia2.getHostName().equals(ia2.getHostAddress())) {
- potentialSanNames.add(ia1.getHostName());
+ if(ignoreIPs) {
+ potentialSanNames.add(cn);
+ } else {
+ try {
+ InetAddress[] ias = InetAddress.getAllByName(cn);
+ Set<String> potentialSanNames = new HashSet<>();
+ for (InetAddress ia1 : ias) {
+ InetAddress ia2 = InetAddress.getByAddress(ia1.getAddress());
+ if (primary == null && ias.length == 1 && trans.ip().equals(ia1.getHostAddress())) {
+ primary = ia1;
+ } else if (!cn.equals(ia1.getHostName())
+ && !ia2.getHostName().equals(ia2.getHostAddress())) {
+ potentialSanNames.add(ia1.getHostName());
+ }
}
+ } catch (UnknownHostException e1) {
+ return Result.err(Result.ERR_BadData, "There is no DNS lookup for %s", cn);
}
- } catch (UnknownHostException e1) {
- return Result.err(Result.ERR_BadData, "There is no DNS lookup for %s", cn);
}
-
}
}
}
diff --git a/auth/sample/data/identities.dat b/auth/sample/data/identities.dat
index 54c0a15d..7bf14d5b 100644
--- a/auth/sample/data/identities.dat
+++ b/auth/sample/data/identities.dat
@@ -41,7 +41,7 @@ clamp|ONAP CLAMP Application|CLAMP|Application|||a|aaf_admin
aai|ONAP AAI Application|AAI|ONAP Application|||a|aaf_admin
appc|ONAP APPC Application|APPC|ONAP Application|||a|aaf_admin
dcae|ONAP DCAE Application|CLAMP|ONAP Application|||a|aaf_admin
-dmaap-bc|ONAP DMaap BC Application|DMaap BC|ONAP Application|||_admina|aaf
+dmaap-bc|ONAP DMaap BC Application|DMaap BC|ONAP Application|||a|aaf_admin
dmaap-mr|ONAP DMaap MR Application|DMaap MR|ONAP Application|||a|aaf_admin
oof|ONAP OOF Application|OOF|ONAP Application|||a|aaf_admin
sdnc|ONAP SDNC Application|SDNC|ONAP Application|||a|aaf_admin
diff --git a/auth/sample/data/sample.identities.dat b/auth/sample/data/sample.identities.dat
index 05ed0cc1..185e1604 100644
--- a/auth/sample/data/sample.identities.dat
+++ b/auth/sample/data/sample.identities.dat
@@ -27,12 +27,12 @@ iretired|Ira Lee M. Retired|Ira|Retired|314-123-1238|clarice.d.contractor@people
# ONAP default Users
aaf_admin|AAF Administrator|Mr AAF|AAF Admin|||e|mmanager
deploy|Deployer|Deployer|Depoyer|||e|aaf_admin
-demo|PORTAL DEMO|PORTAL|DEMO|||e|aaf
-jh0003|PORTAL ADMIN|PORTAL|ADMIN|||e|aaf
-cs0008|PORTAL DESIGNER|PORTAL|DESIGNER|||e|aaf
-jm0007|PORTAL TESTER|PORTAL|TESTER|||e|aaf
-op0001|PORTAL OPS|PORTAL|OPS|||e|aaf
-gv0001|PORTAL GOVERNOR|PORTAL|GOVERNOR|||e|aaf
+demo|PORTAL DEMO|PORTAL|DEMO|||e|aaf_admin
+jh0003|PORTAL ADMIN|PORTAL|ADMIN|||e|aaf_admin
+cs0008|PORTAL DESIGNER|PORTAL|DESIGNER|||e|aaf_admin
+jm0007|PORTAL TESTER|PORTAL|TESTER|||e|aaf_admin
+op0001|PORTAL OPS|PORTAL|OPS|||e|aaf_admin
+gv0001|PORTAL GOVERNOR|PORTAL|GOVERNOR|||e|aaf_admin
# ONAP App IDs
aaf|AAF Application|AAF|Application|||a|aaf_admin
aaf-sms|AAF SMS Application|AAF SMS|Application|||a|aaf_admin
@@ -40,7 +40,7 @@ clamp|ONAP CLAMP Application|CLAMP|Application|||a|aaf_admin
aai|ONAP AAI Application|AAI|ONAP Application|||a|aaf_admin
appc|ONAP APPC Application|APPC|ONAP Application|||a|aaf_admin
dcae|ONAP DCAE Application|CLAMP|ONAP Application|||a|aaf_admin
-dmaap-bc|ONAP DMaap BC Application|DMaap BC|ONAP Application|||_admina|aaf
+dmaap-bc|ONAP DMaap BC Application|DMaap BC|ONAP Application|||a|aaf_admin
dmaap-mr|ONAP DMaap MR Application|DMaap MR|ONAP Application|||a|aaf_admin
oof|ONAP OOF Application|OOF|ONAP Application|||a|aaf_admin
sdnc|ONAP SDNC Application|SDNC|ONAP Application|||a|aaf_admin