Commit 11dda366 authored by romain.guignard@thalesgroup.com's avatar romain.guignard@thalesgroup.com
Browse files

git-svn-id: http://svn.theresis.org/svn/gt-appsec/AuthZForce/AuthZForce/trunk@2162 b5d8583f-9428-48d8-90d7-9fcbe50e6af6
parent 17e3aeb2
......@@ -97,5 +97,10 @@
<artifactId>model</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.thalesgroup.authzforce</groupId>
<artifactId>audit</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -45,7 +45,7 @@ import com.sun.xacml.cond.VariableManager;
import com.sun.xacml.ctx.Result;
import com.sun.xacml.ctx.Status;
import com.thalesgroup.authzforce.audit.AuditLogs;
import com.thalesgroup.authzforce.audit.api.AuditLogs;
import java.io.OutputStream;
import java.io.PrintStream;
......
......@@ -41,8 +41,8 @@ import com.sun.xacml.MatchResult;
import com.sun.xacml.ctx.Result;
import com.sun.xacml.ctx.Status;
import com.thalesgroup.authzforce.audit.AuditLogs;
import com.thalesgroup.authzforce.audit.MatchPolicies;
import com.thalesgroup.authzforce.audit.api.AuditLogs;
import com.thalesgroup.authzforce.audit.api.MatchPolicies;
import java.net.URI;
import java.util.ArrayList;
......
......@@ -52,8 +52,8 @@ import com.sun.xacml.attr.AttributeDesignator;
import com.sun.xacml.attr.AttributeSelector;
import com.sun.xacml.attr.BagAttribute;
import com.sun.xacml.cond.EvaluationResult;
import com.thalesgroup.authzforce.audit.AttributesResolved;
import com.thalesgroup.authzforce.audit.AuditLogs;
import com.thalesgroup.authzforce.audit.api.AttributesResolved;
import com.thalesgroup.authzforce.audit.api.AuditLogs;
/**
......
package com.thalesgroup.authzforce.audit;
import java.net.URI;
public class AttributesResolved {
URI attributeId;
String attributeValue;
public URI getAttributeId() {
return attributeId;
}
public void setAttributeId(URI attributeId) {
this.attributeId = attributeId;
}
public String getAttributeValue() {
return attributeValue;
}
public void setAttributeValue(String attributeValue) {
this.attributeValue = attributeValue;
}
}
package com.thalesgroup.authzforce.audit;
import java.util.ArrayList;
import java.util.List;
public class AuditLogs {
private static AuditLogs audit;
Request request;
String effect;
List<MatchPolicies> matchPolicies;
String ruleId;
String date;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
List<AttributesResolved> attrResolv = new ArrayList<AttributesResolved>();
public Request getRequest() {
return request;
}
public void setRequest(Request request) {
this.request = request;
}
public String getEffect() {
return effect;
}
public void setEffect(String effect) {
this.effect = effect;
}
public List<MatchPolicies> getMatchPolicies() {
return matchPolicies;
}
public void setMatchPolicies(List<MatchPolicies> matchPolicies) {
this.matchPolicies = matchPolicies;
}
public String getRuleId() {
return ruleId;
}
public void setRuleId(String ruleId) {
this.ruleId = ruleId;
}
public List<AttributesResolved> getAttrResolv() {
return attrResolv;
}
public void setAttrResolv(List<AttributesResolved> attrResolv) {
this.attrResolv = attrResolv;
}
public synchronized static AuditLogs getInstance(){
if (audit == null){
audit = new AuditLogs();
}
return audit;
}
public synchronized static AuditLogs remove(){
if (audit != null){
audit = new AuditLogs();
}
return audit;
}
}
package com.thalesgroup.authzforce.audit;
public class MatchPolicies {
String policyId;
String policyVersion;
public String getPolicyId() {
return policyId;
}
public void setPolicyId(String policyId) {
this.policyId = policyId;
}
public String getPolicyVersion() {
return policyVersion;
}
public void setPolicyVersion(String policyVersion) {
this.policyVersion = policyVersion;
}
}
package com.thalesgroup.authzforce.audit;
import java.util.List;
import java.util.Map;
public class Request {
List<Map<String,String>> Subjects;
List<Map<String,String>> resources;
List<Map<String,String>> actions;
List<Map<String,String>> environments;
public List<Map<String, String>> getSubjects() {
return Subjects;
}
public void setSubjects(List<Map<String, String>> subjects) {
Subjects = subjects;
}
public List<Map<String, String>> getResources() {
return resources;
}
public void setResources(List<Map<String, String>> resources) {
this.resources = resources;
}
public List<Map<String, String>> getActions() {
return actions;
}
public void setActions(List<Map<String, String>> actions) {
this.actions = actions;
}
public List<Map<String, String>> getEnvironments() {
return environments;
}
public void setEnvironments(List<Map<String, String>> environments) {
this.environments = environments;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment