Fix wrong category for timeRange 83/117983/2
authorPamela Dragosh <pdragosh@research.att.com>
Wed, 17 Feb 2021 15:40:27 +0000 (09:40 -0600)
committerPamela Dragosh <pdragosh@research.att.com>
Wed, 17 Feb 2021 15:43:20 +0000 (09:43 -0600)
The category is wrong, and will not work. So fixing this bug first before
working in the changes for use new Time Extensions. I may make it all configurable.

Issue-ID: POLICY-2810
Change-Id: I4a338242dd4ec35f9b45fa1f46609dea93e286a1
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java

index 2b71374..ddb9bb0 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -317,7 +317,7 @@ public class GuardTranslator implements ToscaPolicyTranslator {
                 ((Map) timeRange).get("start_time").toString(),
                 XACML3.ID_DATATYPE_TIME,
                 XACML3.ID_ENVIRONMENT_CURRENT_TIME,
-                XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE);
+                XACML3.ID_ATTRIBUTE_CATEGORY_ENVIRONMENT);
 
         allOf.getMatch().add(matchStart);