The following schema fragment specifies the expected content contained within this class.
+ *
+ *
projects;
+
+ /**
+ * Gets the value of the token property.
+ *
+ * @return
+ * possible object is
+ * {@link Token }
+ *
+ */
+ public Token getToken() {
+ return token;
+ }
+
+ /**
+ * Sets the value of the token property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Token }
+ *
+ */
+ public void setToken(Token value) {
+ this.token = value;
+ }
+
+ /**
+ * Gets the value of the projects property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the projects property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getProjects().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List getProjects() {
+ if (projects == null) {
+ projects = new ArrayList();
+ }
+ return this.projects;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Auth.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Auth.java
new file mode 100644
index 000000000..f63a69f40
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Auth.java
@@ -0,0 +1,148 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for auth complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="auth">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="passwordCredentials" type="{http://platformlayer.org/auth/v1.0}passwordCredentials" minOccurs="0"/>
+ * <element name="certificateCredentials" type="{http://platformlayer.org/auth/v1.0}certificateCredentials" minOccurs="0"/>
+ * <element name="token" type="{http://platformlayer.org/auth/v1.0}token" minOccurs="0"/>
+ * <element name="user" type="{http://platformlayer.org/auth/v1.0}userValidation" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "auth", propOrder = {
+ "passwordCredentials",
+ "certificateCredentials",
+ "token",
+ "user"
+})
+public class Auth {
+
+ protected PasswordCredentials passwordCredentials;
+ protected CertificateCredentials certificateCredentials;
+ protected Token token;
+ protected UserValidation user;
+
+ /**
+ * Gets the value of the passwordCredentials property.
+ *
+ * @return
+ * possible object is
+ * {@link PasswordCredentials }
+ *
+ */
+ public PasswordCredentials getPasswordCredentials() {
+ return passwordCredentials;
+ }
+
+ /**
+ * Sets the value of the passwordCredentials property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PasswordCredentials }
+ *
+ */
+ public void setPasswordCredentials(PasswordCredentials value) {
+ this.passwordCredentials = value;
+ }
+
+ /**
+ * Gets the value of the certificateCredentials property.
+ *
+ * @return
+ * possible object is
+ * {@link CertificateCredentials }
+ *
+ */
+ public CertificateCredentials getCertificateCredentials() {
+ return certificateCredentials;
+ }
+
+ /**
+ * Sets the value of the certificateCredentials property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CertificateCredentials }
+ *
+ */
+ public void setCertificateCredentials(CertificateCredentials value) {
+ this.certificateCredentials = value;
+ }
+
+ /**
+ * Gets the value of the token property.
+ *
+ * @return
+ * possible object is
+ * {@link Token }
+ *
+ */
+ public Token getToken() {
+ return token;
+ }
+
+ /**
+ * Sets the value of the token property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Token }
+ *
+ */
+ public void setToken(Token value) {
+ this.token = value;
+ }
+
+ /**
+ * Gets the value of the user property.
+ *
+ * @return
+ * possible object is
+ * {@link UserValidation }
+ *
+ */
+ public UserValidation getUser() {
+ return user;
+ }
+
+ /**
+ * Sets the value of the user property.
+ *
+ * @param value
+ * allowed object is
+ * {@link UserValidation }
+ *
+ */
+ public void setUser(UserValidation value) {
+ this.user = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/AuthenticateRequest.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/AuthenticateRequest.java
new file mode 100644
index 000000000..3219d0ef8
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/AuthenticateRequest.java
@@ -0,0 +1,67 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for authenticateRequest complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="authenticateRequest">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{http://platformlayer.org/auth/v1.0}auth" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "authenticateRequest", propOrder = {
+ "auth"
+})
+public class AuthenticateRequest {
+
+ protected Auth auth;
+
+ /**
+ * Gets the value of the auth property.
+ *
+ * @return
+ * possible object is
+ * {@link Auth }
+ *
+ */
+ public Auth getAuth() {
+ return auth;
+ }
+
+ /**
+ * Sets the value of the auth property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Auth }
+ *
+ */
+ public void setAuth(Auth value) {
+ this.auth = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/AuthenticateResponse.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/AuthenticateResponse.java
new file mode 100644
index 000000000..3c8429a0e
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/AuthenticateResponse.java
@@ -0,0 +1,119 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for authenticateResponse complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="authenticateResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{http://platformlayer.org/auth/v1.0}access" minOccurs="0"/>
+ * <element name="challenge" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
+ * <element name="statusCode" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "authenticateResponse", propOrder = {
+ "access",
+ "challenge",
+ "statusCode"
+})
+public class AuthenticateResponse {
+
+ protected Access access;
+ protected byte[] challenge;
+ protected Integer statusCode;
+
+ /**
+ * Gets the value of the access property.
+ *
+ * @return
+ * possible object is
+ * {@link Access }
+ *
+ */
+ public Access getAccess() {
+ return access;
+ }
+
+ /**
+ * Sets the value of the access property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Access }
+ *
+ */
+ public void setAccess(Access value) {
+ this.access = value;
+ }
+
+ /**
+ * Gets the value of the challenge property.
+ *
+ * @return
+ * possible object is
+ * byte[]
+ */
+ public byte[] getChallenge() {
+ return challenge;
+ }
+
+ /**
+ * Sets the value of the challenge property.
+ *
+ * @param value
+ * allowed object is
+ * byte[]
+ */
+ public void setChallenge(byte[] value) {
+ this.challenge = ((byte[]) value);
+ }
+
+ /**
+ * Gets the value of the statusCode property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getStatusCode() {
+ return statusCode;
+ }
+
+ /**
+ * Sets the value of the statusCode property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setStatusCode(Integer value) {
+ this.statusCode = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateChainInfo.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateChainInfo.java
new file mode 100644
index 000000000..4c5dfe35d
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateChainInfo.java
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for certificateChainInfo complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="certificateChainInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="certificates" type="{http://platformlayer.org/auth/v1.0}certificateInfo" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "certificateChainInfo", propOrder = {
+ "certificates"
+})
+public class CertificateChainInfo {
+
+ @XmlElement(nillable = true)
+ protected List certificates;
+
+ /**
+ * Gets the value of the certificates property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the certificates property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getCertificates().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link CertificateInfo }
+ *
+ *
+ */
+ public List getCertificates() {
+ if (certificates == null) {
+ certificates = new ArrayList();
+ }
+ return this.certificates;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateCredentials.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateCredentials.java
new file mode 100644
index 000000000..4bfed3d3c
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateCredentials.java
@@ -0,0 +1,92 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for certificateCredentials complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="certificateCredentials">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="username" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="challengeResponse" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "certificateCredentials", propOrder = {
+ "username",
+ "challengeResponse"
+})
+public class CertificateCredentials {
+
+ protected String username;
+ protected byte[] challengeResponse;
+
+ /**
+ * Gets the value of the username property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * Sets the value of the username property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setUsername(String value) {
+ this.username = value;
+ }
+
+ /**
+ * Gets the value of the challengeResponse property.
+ *
+ * @return
+ * possible object is
+ * byte[]
+ */
+ public byte[] getChallengeResponse() {
+ return challengeResponse;
+ }
+
+ /**
+ * Sets the value of the challengeResponse property.
+ *
+ * @param value
+ * allowed object is
+ * byte[]
+ */
+ public void setChallengeResponse(byte[] value) {
+ this.challengeResponse = ((byte[]) value);
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateInfo.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateInfo.java
new file mode 100644
index 000000000..2fafb6d27
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CertificateInfo.java
@@ -0,0 +1,121 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for certificateInfo complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="certificateInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="publicKeyHash" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="publicKey" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="subjectDN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "certificateInfo", propOrder = {
+ "publicKeyHash",
+ "publicKey",
+ "subjectDN"
+})
+public class CertificateInfo {
+
+ protected String publicKeyHash;
+ protected String publicKey;
+ protected String subjectDN;
+
+ /**
+ * Gets the value of the publicKeyHash property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPublicKeyHash() {
+ return publicKeyHash;
+ }
+
+ /**
+ * Sets the value of the publicKeyHash property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPublicKeyHash(String value) {
+ this.publicKeyHash = value;
+ }
+
+ /**
+ * Gets the value of the publicKey property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPublicKey() {
+ return publicKey;
+ }
+
+ /**
+ * Sets the value of the publicKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPublicKey(String value) {
+ this.publicKey = value;
+ }
+
+ /**
+ * Gets the value of the subjectDN property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSubjectDN() {
+ return subjectDN;
+ }
+
+ /**
+ * Sets the value of the subjectDN property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSubjectDN(String value) {
+ this.subjectDN = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CheckServiceAccessRequest.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CheckServiceAccessRequest.java
new file mode 100644
index 000000000..6fec971f9
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CheckServiceAccessRequest.java
@@ -0,0 +1,67 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for checkServiceAccessRequest complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="checkServiceAccessRequest">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="chain" type="{http://platformlayer.org/auth/v1.0}certificateChainInfo" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "checkServiceAccessRequest", propOrder = {
+ "chain"
+})
+public class CheckServiceAccessRequest {
+
+ protected CertificateChainInfo chain;
+
+ /**
+ * Gets the value of the chain property.
+ *
+ * @return
+ * possible object is
+ * {@link CertificateChainInfo }
+ *
+ */
+ public CertificateChainInfo getChain() {
+ return chain;
+ }
+
+ /**
+ * Sets the value of the chain property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CertificateChainInfo }
+ *
+ */
+ public void setChain(CertificateChainInfo value) {
+ this.chain = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CheckServiceAccessResponse.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CheckServiceAccessResponse.java
new file mode 100644
index 000000000..ec0fbf3e8
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/CheckServiceAccessResponse.java
@@ -0,0 +1,67 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for checkServiceAccessResponse complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="checkServiceAccessResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="serviceAccount" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "checkServiceAccessResponse", propOrder = {
+ "serviceAccount"
+})
+public class CheckServiceAccessResponse {
+
+ protected String serviceAccount;
+
+ /**
+ * Gets the value of the serviceAccount property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceAccount() {
+ return serviceAccount;
+ }
+
+ /**
+ * Sets the value of the serviceAccount property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceAccount(String value) {
+ this.serviceAccount = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ObjectFactory.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ObjectFactory.java
new file mode 100644
index 000000000..1c034cae2
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ObjectFactory.java
@@ -0,0 +1,368 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.platformlayer.auth.v1 package.
+ * An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _SignCertificateRequest_QNAME = new QName("http://platformlayer.org/auth/v1.0", "signCertificateRequest");
+ private final static QName _CheckServiceAccessResponse_QNAME = new QName("http://platformlayer.org/auth/v1.0", "checkServiceAccessResponse");
+ private final static QName _CheckServiceAccessRequest_QNAME = new QName("http://platformlayer.org/auth/v1.0", "checkServiceAccessRequest");
+ private final static QName _Access_QNAME = new QName("http://platformlayer.org/auth/v1.0", "access");
+ private final static QName _ValidateTokenResponse_QNAME = new QName("http://platformlayer.org/auth/v1.0", "validateTokenResponse");
+ private final static QName _SignCertificateResponse_QNAME = new QName("http://platformlayer.org/auth/v1.0", "signCertificateResponse");
+ private final static QName _Roles_QNAME = new QName("http://platformlayer.org/auth/v1.0", "roles");
+ private final static QName _RegistrationRequest_QNAME = new QName("http://platformlayer.org/auth/v1.0", "registrationRequest");
+ private final static QName _RegistrationResponse_QNAME = new QName("http://platformlayer.org/auth/v1.0", "registrationResponse");
+ private final static QName _Auth_QNAME = new QName("http://platformlayer.org/auth/v1.0", "auth");
+ private final static QName _ValidateAccess_QNAME = new QName("http://platformlayer.org/auth/v1.0", "validateAccess");
+ private final static QName _CertificateChainInfo_QNAME = new QName("http://platformlayer.org/auth/v1.0", "certificateChainInfo");
+ private final static QName _User_QNAME = new QName("http://platformlayer.org/auth/v1.0", "user");
+ private final static QName _AuthenticateResponse_QNAME = new QName("http://platformlayer.org/auth/v1.0", "authenticateResponse");
+ private final static QName _AuthenticateRequest_QNAME = new QName("http://platformlayer.org/auth/v1.0", "authenticateRequest");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.platformlayer.auth.v1
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link PasswordCredentials }
+ *
+ */
+ public PasswordCredentials createPasswordCredentials() {
+ return new PasswordCredentials();
+ }
+
+ /**
+ * Create an instance of {@link AuthenticateResponse }
+ *
+ */
+ public AuthenticateResponse createAuthenticateResponse() {
+ return new AuthenticateResponse();
+ }
+
+ /**
+ * Create an instance of {@link RegistrationRequest }
+ *
+ */
+ public RegistrationRequest createRegistrationRequest() {
+ return new RegistrationRequest();
+ }
+
+ /**
+ * Create an instance of {@link CertificateInfo }
+ *
+ */
+ public CertificateInfo createCertificateInfo() {
+ return new CertificateInfo();
+ }
+
+ /**
+ * Create an instance of {@link Access }
+ *
+ */
+ public Access createAccess() {
+ return new Access();
+ }
+
+ /**
+ * Create an instance of {@link ValidateTokenResponse }
+ *
+ */
+ public ValidateTokenResponse createValidateTokenResponse() {
+ return new ValidateTokenResponse();
+ }
+
+ /**
+ * Create an instance of {@link ValidateAccess }
+ *
+ */
+ public ValidateAccess createValidateAccess() {
+ return new ValidateAccess();
+ }
+
+ /**
+ * Create an instance of {@link UserValidation }
+ *
+ */
+ public UserValidation createUserValidation() {
+ return new UserValidation();
+ }
+
+ /**
+ * Create an instance of {@link Token }
+ *
+ */
+ public Token createToken() {
+ return new Token();
+ }
+
+ /**
+ * Create an instance of {@link RegistrationResponse }
+ *
+ */
+ public RegistrationResponse createRegistrationResponse() {
+ return new RegistrationResponse();
+ }
+
+ /**
+ * Create an instance of {@link ProjectValidation }
+ *
+ */
+ public ProjectValidation createProjectValidation() {
+ return new ProjectValidation();
+ }
+
+ /**
+ * Create an instance of {@link User }
+ *
+ */
+ public User createUser() {
+ return new User();
+ }
+
+ /**
+ * Create an instance of {@link CertificateChainInfo }
+ *
+ */
+ public CertificateChainInfo createCertificateChainInfo() {
+ return new CertificateChainInfo();
+ }
+
+ /**
+ * Create an instance of {@link CertificateCredentials }
+ *
+ */
+ public CertificateCredentials createCertificateCredentials() {
+ return new CertificateCredentials();
+ }
+
+ /**
+ * Create an instance of {@link RoleList }
+ *
+ */
+ public RoleList createRoleList() {
+ return new RoleList();
+ }
+
+ /**
+ * Create an instance of {@link SignCertificateRequest }
+ *
+ */
+ public SignCertificateRequest createSignCertificateRequest() {
+ return new SignCertificateRequest();
+ }
+
+ /**
+ * Create an instance of {@link CheckServiceAccessRequest }
+ *
+ */
+ public CheckServiceAccessRequest createCheckServiceAccessRequest() {
+ return new CheckServiceAccessRequest();
+ }
+
+ /**
+ * Create an instance of {@link Role }
+ *
+ */
+ public Role createRole() {
+ return new Role();
+ }
+
+ /**
+ * Create an instance of {@link SignCertificateResponse }
+ *
+ */
+ public SignCertificateResponse createSignCertificateResponse() {
+ return new SignCertificateResponse();
+ }
+
+ /**
+ * Create an instance of {@link AuthenticateRequest }
+ *
+ */
+ public AuthenticateRequest createAuthenticateRequest() {
+ return new AuthenticateRequest();
+ }
+
+ /**
+ * Create an instance of {@link Auth }
+ *
+ */
+ public Auth createAuth() {
+ return new Auth();
+ }
+
+ /**
+ * Create an instance of {@link CheckServiceAccessResponse }
+ *
+ */
+ public CheckServiceAccessResponse createCheckServiceAccessResponse() {
+ return new CheckServiceAccessResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SignCertificateRequest }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "signCertificateRequest")
+ public JAXBElement createSignCertificateRequest(SignCertificateRequest value) {
+ return new JAXBElement(_SignCertificateRequest_QNAME, SignCertificateRequest.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link CheckServiceAccessResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "checkServiceAccessResponse")
+ public JAXBElement createCheckServiceAccessResponse(CheckServiceAccessResponse value) {
+ return new JAXBElement(_CheckServiceAccessResponse_QNAME, CheckServiceAccessResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link CheckServiceAccessRequest }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "checkServiceAccessRequest")
+ public JAXBElement createCheckServiceAccessRequest(CheckServiceAccessRequest value) {
+ return new JAXBElement(_CheckServiceAccessRequest_QNAME, CheckServiceAccessRequest.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Access }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "access")
+ public JAXBElement createAccess(Access value) {
+ return new JAXBElement(_Access_QNAME, Access.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link ValidateTokenResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "validateTokenResponse")
+ public JAXBElement createValidateTokenResponse(ValidateTokenResponse value) {
+ return new JAXBElement(_ValidateTokenResponse_QNAME, ValidateTokenResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SignCertificateResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "signCertificateResponse")
+ public JAXBElement createSignCertificateResponse(SignCertificateResponse value) {
+ return new JAXBElement(_SignCertificateResponse_QNAME, SignCertificateResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RoleList }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "roles")
+ public JAXBElement createRoles(RoleList value) {
+ return new JAXBElement(_Roles_QNAME, RoleList.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RegistrationRequest }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "registrationRequest")
+ public JAXBElement createRegistrationRequest(RegistrationRequest value) {
+ return new JAXBElement(_RegistrationRequest_QNAME, RegistrationRequest.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RegistrationResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "registrationResponse")
+ public JAXBElement createRegistrationResponse(RegistrationResponse value) {
+ return new JAXBElement(_RegistrationResponse_QNAME, RegistrationResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Auth }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "auth")
+ public JAXBElement createAuth(Auth value) {
+ return new JAXBElement(_Auth_QNAME, Auth.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link ValidateAccess }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "validateAccess")
+ public JAXBElement createValidateAccess(ValidateAccess value) {
+ return new JAXBElement(_ValidateAccess_QNAME, ValidateAccess.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link CertificateChainInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "certificateChainInfo")
+ public JAXBElement createCertificateChainInfo(CertificateChainInfo value) {
+ return new JAXBElement(_CertificateChainInfo_QNAME, CertificateChainInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link User }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "user")
+ public JAXBElement createUser(User value) {
+ return new JAXBElement(_User_QNAME, User.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AuthenticateResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "authenticateResponse")
+ public JAXBElement createAuthenticateResponse(AuthenticateResponse value) {
+ return new JAXBElement(_AuthenticateResponse_QNAME, AuthenticateResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AuthenticateRequest }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://platformlayer.org/auth/v1.0", name = "authenticateRequest")
+ public JAXBElement createAuthenticateRequest(AuthenticateRequest value) {
+ return new JAXBElement(_AuthenticateRequest_QNAME, AuthenticateRequest.class, null, value);
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/PasswordCredentials.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/PasswordCredentials.java
new file mode 100644
index 000000000..f4621cbf8
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/PasswordCredentials.java
@@ -0,0 +1,94 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for passwordCredentials complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="passwordCredentials">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="username" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="password" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "passwordCredentials", propOrder = {
+ "username",
+ "password"
+})
+public class PasswordCredentials {
+
+ protected String username;
+ protected String password;
+
+ /**
+ * Gets the value of the username property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * Sets the value of the username property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setUsername(String value) {
+ this.username = value;
+ }
+
+ /**
+ * Gets the value of the password property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * Sets the value of the password property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPassword(String value) {
+ this.password = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ProjectValidation.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ProjectValidation.java
new file mode 100644
index 000000000..bcbff09ea
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ProjectValidation.java
@@ -0,0 +1,155 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for projectValidation complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="projectValidation">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="secret" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
+ * <element name="roles" type="{http://platformlayer.org/auth/v1.0}role" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "projectValidation", propOrder = {
+ "id",
+ "name",
+ "secret",
+ "roles"
+})
+public class ProjectValidation {
+
+ protected String id;
+ protected String name;
+ protected byte[] secret;
+ @XmlElement(nillable = true)
+ protected List roles;
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setId(String value) {
+ this.id = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the secret property.
+ *
+ * @return
+ * possible object is
+ * byte[]
+ */
+ public byte[] getSecret() {
+ return secret;
+ }
+
+ /**
+ * Sets the value of the secret property.
+ *
+ * @param value
+ * allowed object is
+ * byte[]
+ */
+ public void setSecret(byte[] value) {
+ this.secret = ((byte[]) value);
+ }
+
+ /**
+ * Gets the value of the roles property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the roles property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getRoles().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link Role }
+ *
+ *
+ */
+ public List getRoles() {
+ if (roles == null) {
+ roles = new ArrayList();
+ }
+ return this.roles;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RegistrationRequest.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RegistrationRequest.java
new file mode 100644
index 000000000..cf5c401ed
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RegistrationRequest.java
@@ -0,0 +1,94 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for registrationRequest complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="registrationRequest">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="username" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="password" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "registrationRequest", propOrder = {
+ "username",
+ "password"
+})
+public class RegistrationRequest {
+
+ protected String username;
+ protected String password;
+
+ /**
+ * Gets the value of the username property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * Sets the value of the username property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setUsername(String value) {
+ this.username = value;
+ }
+
+ /**
+ * Gets the value of the password property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * Sets the value of the password property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPassword(String value) {
+ this.password = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RegistrationResponse.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RegistrationResponse.java
new file mode 100644
index 000000000..55a8a9eeb
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RegistrationResponse.java
@@ -0,0 +1,94 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for registrationResponse complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="registrationResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{http://platformlayer.org/auth/v1.0}access" minOccurs="0"/>
+ * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "registrationResponse", propOrder = {
+ "access",
+ "errorMessage"
+})
+public class RegistrationResponse {
+
+ protected Access access;
+ protected String errorMessage;
+
+ /**
+ * Gets the value of the access property.
+ *
+ * @return
+ * possible object is
+ * {@link Access }
+ *
+ */
+ public Access getAccess() {
+ return access;
+ }
+
+ /**
+ * Sets the value of the access property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Access }
+ *
+ */
+ public void setAccess(Access value) {
+ this.access = value;
+ }
+
+ /**
+ * Gets the value of the errorMessage property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ /**
+ * Sets the value of the errorMessage property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setErrorMessage(String value) {
+ this.errorMessage = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Role.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Role.java
new file mode 100644
index 000000000..6fb581ca3
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Role.java
@@ -0,0 +1,67 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for role complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="role">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "role", propOrder = {
+ "name"
+})
+public class Role {
+
+ protected String name;
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RoleList.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RoleList.java
new file mode 100644
index 000000000..8d2f72551
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/RoleList.java
@@ -0,0 +1,74 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for roleList complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="roleList">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="role" type="{http://platformlayer.org/auth/v1.0}role" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "roleList", propOrder = {
+ "role"
+})
+public class RoleList {
+
+ protected List role;
+
+ /**
+ * Gets the value of the role property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the role property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getRole().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link Role }
+ *
+ *
+ */
+ public List getRole() {
+ if (role == null) {
+ role = new ArrayList();
+ }
+ return this.role;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/SignCertificateRequest.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/SignCertificateRequest.java
new file mode 100644
index 000000000..0ed266822
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/SignCertificateRequest.java
@@ -0,0 +1,119 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for signCertificateRequest complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="signCertificateRequest">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="project" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="csr" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="projectSecret" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "signCertificateRequest", propOrder = {
+ "project",
+ "csr",
+ "projectSecret"
+})
+public class SignCertificateRequest {
+
+ protected String project;
+ protected String csr;
+ protected byte[] projectSecret;
+
+ /**
+ * Gets the value of the project property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getProject() {
+ return project;
+ }
+
+ /**
+ * Sets the value of the project property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setProject(String value) {
+ this.project = value;
+ }
+
+ /**
+ * Gets the value of the csr property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCsr() {
+ return csr;
+ }
+
+ /**
+ * Sets the value of the csr property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCsr(String value) {
+ this.csr = value;
+ }
+
+ /**
+ * Gets the value of the projectSecret property.
+ *
+ * @return
+ * possible object is
+ * byte[]
+ */
+ public byte[] getProjectSecret() {
+ return projectSecret;
+ }
+
+ /**
+ * Sets the value of the projectSecret property.
+ *
+ * @param value
+ * allowed object is
+ * byte[]
+ */
+ public void setProjectSecret(byte[] value) {
+ this.projectSecret = ((byte[]) value);
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/SignCertificateResponse.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/SignCertificateResponse.java
new file mode 100644
index 000000000..f74036f7a
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/SignCertificateResponse.java
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for signCertificateResponse complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="signCertificateResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="certificates" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "signCertificateResponse", propOrder = {
+ "certificates"
+})
+public class SignCertificateResponse {
+
+ @XmlElement(nillable = true)
+ protected List certificates;
+
+ /**
+ * Gets the value of the certificates property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the certificates property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getCertificates().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List getCertificates() {
+ if (certificates == null) {
+ certificates = new ArrayList();
+ }
+ return this.certificates;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Token.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Token.java
new file mode 100644
index 000000000..8451e0344
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/Token.java
@@ -0,0 +1,97 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * Java class for token complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="token">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="expires" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ * <element name="id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "token", propOrder = {
+ "expires",
+ "id"
+})
+public class Token {
+
+ @XmlSchemaType(name = "dateTime")
+ protected XMLGregorianCalendar expires;
+ protected String id;
+
+ /**
+ * Gets the value of the expires property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getExpires() {
+ return expires;
+ }
+
+ /**
+ * Sets the value of the expires property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setExpires(XMLGregorianCalendar value) {
+ this.expires = value;
+ }
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setId(String value) {
+ this.id = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/User.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/User.java
new file mode 100644
index 000000000..017e4092d
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/User.java
@@ -0,0 +1,141 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for user complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="user">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="username" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="enabled" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * <attribute name="email" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "user", propOrder = {
+ "username"
+})
+public class User {
+
+ protected String username;
+ @XmlAttribute(name = "enabled", required = true)
+ protected boolean enabled;
+ @XmlAttribute(name = "email")
+ protected String email;
+ @XmlAttribute(name = "id")
+ protected String id;
+
+ /**
+ * Gets the value of the username property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * Sets the value of the username property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setUsername(String value) {
+ this.username = value;
+ }
+
+ /**
+ * Gets the value of the enabled property.
+ *
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ /**
+ * Sets the value of the enabled property.
+ *
+ */
+ public void setEnabled(boolean value) {
+ this.enabled = value;
+ }
+
+ /**
+ * Gets the value of the email property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * Sets the value of the email property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEmail(String value) {
+ this.email = value;
+ }
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setId(String value) {
+ this.id = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/UserValidation.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/UserValidation.java
new file mode 100644
index 000000000..f5f23aac0
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/UserValidation.java
@@ -0,0 +1,94 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for userValidation complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="userValidation">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "userValidation", propOrder = {
+ "id",
+ "name"
+})
+public class UserValidation {
+
+ protected String id;
+ protected String name;
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setId(String value) {
+ this.id = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ValidateAccess.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ValidateAccess.java
new file mode 100644
index 000000000..69c6bf369
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ValidateAccess.java
@@ -0,0 +1,121 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for validateAccess complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="validateAccess">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="token" type="{http://platformlayer.org/auth/v1.0}token" minOccurs="0"/>
+ * <element name="user" type="{http://platformlayer.org/auth/v1.0}userValidation" minOccurs="0"/>
+ * <element name="project" type="{http://platformlayer.org/auth/v1.0}projectValidation" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "validateAccess", propOrder = {
+ "token",
+ "user",
+ "project"
+})
+public class ValidateAccess {
+
+ protected Token token;
+ protected UserValidation user;
+ protected ProjectValidation project;
+
+ /**
+ * Gets the value of the token property.
+ *
+ * @return
+ * possible object is
+ * {@link Token }
+ *
+ */
+ public Token getToken() {
+ return token;
+ }
+
+ /**
+ * Sets the value of the token property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Token }
+ *
+ */
+ public void setToken(Token value) {
+ this.token = value;
+ }
+
+ /**
+ * Gets the value of the user property.
+ *
+ * @return
+ * possible object is
+ * {@link UserValidation }
+ *
+ */
+ public UserValidation getUser() {
+ return user;
+ }
+
+ /**
+ * Sets the value of the user property.
+ *
+ * @param value
+ * allowed object is
+ * {@link UserValidation }
+ *
+ */
+ public void setUser(UserValidation value) {
+ this.user = value;
+ }
+
+ /**
+ * Gets the value of the project property.
+ *
+ * @return
+ * possible object is
+ * {@link ProjectValidation }
+ *
+ */
+ public ProjectValidation getProject() {
+ return project;
+ }
+
+ /**
+ * Sets the value of the project property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ProjectValidation }
+ *
+ */
+ public void setProject(ProjectValidation value) {
+ this.project = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ValidateTokenResponse.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ValidateTokenResponse.java
new file mode 100644
index 000000000..29ecd4db9
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/ValidateTokenResponse.java
@@ -0,0 +1,67 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+
+package org.platformlayer.auth.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for validateTokenResponse complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="validateTokenResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="access" type="{http://platformlayer.org/auth/v1.0}validateAccess" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "validateTokenResponse", propOrder = {
+ "access"
+})
+public class ValidateTokenResponse {
+
+ protected ValidateAccess access;
+
+ /**
+ * Gets the value of the access property.
+ *
+ * @return
+ * possible object is
+ * {@link ValidateAccess }
+ *
+ */
+ public ValidateAccess getAccess() {
+ return access;
+ }
+
+ /**
+ * Sets the value of the access property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ValidateAccess }
+ *
+ */
+ public void setAccess(ValidateAccess value) {
+ this.access = value;
+ }
+
+}
diff --git a/auth/client/src/generated/xjc/org/platformlayer/auth/v1/package-info.java b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/package-info.java
new file mode 100644
index 000000000..3bce1a7ff
--- /dev/null
+++ b/auth/client/src/generated/xjc/org/platformlayer/auth/v1/package-info.java
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2013.03.26 at 03:21:34 PM PDT
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://platformlayer.org/auth/v1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.platformlayer.auth.v1;
diff --git a/auth/client/src/main/java/org/openstack/keystone/auth/client/Keystone.java b/auth/client/src/main/java/org/openstack/keystone/auth/client/Keystone.java
deleted file mode 100644
index abd7cbc8c..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/auth/client/Keystone.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.openstack.keystone.auth.client;
-
-public class Keystone {
- public static final String AUTH_HEADER = "X-Auth-Token";
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationClient.java b/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationClient.java
deleted file mode 100644
index a0c66cb9f..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationClient.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.openstack.keystone.auth.client;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Random;
-
-import javax.xml.bind.JAXBException;
-
-import org.openstack.docs.identity.api.v2.Auth;
-import org.openstack.docs.identity.api.v2.AuthenticateRequest;
-import org.openstack.docs.identity.api.v2.AuthenticateResponse;
-import org.openstack.docs.identity.api.v2.PasswordCredentials;
-import org.openstack.docs.identity.api.v2.TenantsList;
-import org.openstack.utils.Utf8;
-import org.platformlayer.CastUtils;
-import org.platformlayer.IoUtils;
-import org.platformlayer.WellKnownPorts;
-import org.platformlayer.http.SimpleHttpRequest;
-import org.platformlayer.http.SimpleHttpRequest.SimpleHttpResponse;
-import org.platformlayer.xml.JaxbHelper;
-import org.platformlayer.xml.UnmarshalException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class KeystoneAuthenticationClient {
- static final Logger log = LoggerFactory.getLogger(KeystoneAuthenticationClient.class);
-
- final String authenticationUrl;
-
- public static final String DEFAULT_AUTHENTICATION_URL = "http://127.0.0.1:"
- + WellKnownPorts.PORT_PLATFORMLAYER_AUTH_USER + "/v2.0/";
-
- public static final Integer HTTP_500_ERROR = new Integer(500);
-
- protected static final int MAX_RETRIES = 10;
-
- static Random random = new Random();
-
- public KeystoneAuthenticationClient(String authenticationUrl) {
- this.authenticationUrl = authenticationUrl;
- }
-
- public KeystoneAuthenticationClient() {
- this(DEFAULT_AUTHENTICATION_URL);
- }
-
- public TenantsList listTenants(KeystoneAuthenticationToken token) throws KeystoneAuthenticationException {
- return doSimpleRequest(token, "GET", "tokens", null, TenantsList.class);
- }
-
- public KeystoneAuthenticationToken authenticate(String tenantName, PasswordCredentials passwordCredentials)
- throws KeystoneAuthenticationException {
- Auth auth = new Auth();
- auth.setPasswordCredentials(passwordCredentials);
- auth.setTenantName(tenantName);
-
- AuthenticateRequest request = new AuthenticateRequest();
- request.setAuth(auth);
-
- AuthenticateResponse response = doSimpleRequest(null, "POST", "tokens", request, AuthenticateResponse.class);
- return new KeystoneAuthenticationToken(response.getAccess());
- }
-
- private T doSimpleRequest(KeystoneAuthenticationToken token, String method, String relativeUri,
- Object postObject, Class responseClass) throws KeystoneAuthenticationException {
- try {
- URI uri = new URI(authenticationUrl + relativeUri);
-
- SimpleHttpRequest httpRequest = SimpleHttpRequest.build(method, uri);
-
- httpRequest.setRequestHeader("Accept", "application/xml");
-
- if (token != null) {
- token.populateRequest(httpRequest);
- }
-
- if (postObject != null) {
- httpRequest.setRequestHeader("Content-Type", "application/xml");
- String xml = serializeXml(postObject);
- httpRequest.getOutputStream().write(Utf8.getBytes(xml));
- }
-
- SimpleHttpResponse response = httpRequest.doRequest();
-
- int responseCode = response.getHttpResponseCode();
- switch (responseCode) {
- case 401:
- throw new KeystoneAuthenticationException("Platformlayer credentials were not correct");
-
- case 200:
- case 203: {
- if (responseClass.equals(String.class)) {
- return CastUtils.as(IoUtils.readAll(response.getInputStream()), responseClass);
- } else {
- return deserializeXml(response.getInputStream(), responseClass);
- }
- }
-
- default:
- throw new KeystoneAuthenticationException("Unexpected result code: " + responseCode);
- }
- } catch (IOException e) {
- throw new KeystoneAuthenticationException("Error communicating with authentication service", e);
- } catch (URISyntaxException e) {
- throw new KeystoneAuthenticationException("Error building authentication URI", e);
- }
-
- }
-
- public static T deserializeXml(InputStream is, Class clazz) throws KeystoneAuthenticationException {
- try {
- return JaxbHelper.deserializeXmlObject(is, clazz, true);
- } catch (UnmarshalException e) {
- throw new KeystoneAuthenticationException("Error reading authentication response data", e);
- }
- }
-
- public static String serializeXml(Object object) throws KeystoneAuthenticationException {
- try {
- boolean formatted = false;
- return JaxbHelper.toXml(object, formatted);
- } catch (JAXBException e) {
- throw new KeystoneAuthenticationException("Error serializing data", e);
- }
- }
-
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationException.java b/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationException.java
deleted file mode 100644
index e7601b958..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationException.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.openstack.keystone.auth.client;
-
-import org.platformlayer.auth.OpenstackAuthenticationException;
-
-public class KeystoneAuthenticationException extends OpenstackAuthenticationException {
- private static final long serialVersionUID = 1L;
-
- public KeystoneAuthenticationException(String message) {
- super(message);
- }
-
- public KeystoneAuthenticationException(String message, Exception e) {
- super(message, e);
- }
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationToken.java b/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationToken.java
deleted file mode 100644
index b86e088f5..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticationToken.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.openstack.keystone.auth.client;
-
-import org.openstack.docs.identity.api.v2.Access;
-import org.openstack.docs.identity.api.v2.Service;
-import org.openstack.docs.identity.api.v2.ServiceEndpoint;
-import org.platformlayer.auth.AuthenticationToken;
-import org.platformlayer.http.SimpleHttpRequest;
-
-import com.google.common.base.Objects;
-
-public class KeystoneAuthenticationToken implements AuthenticationToken {
- private final Access access;
-
- public KeystoneAuthenticationToken(Access access) {
- this.access = access;
- }
-
- public String getAuthTokenValue() {
- return access.getToken().getId();
- }
-
- @Override
- public String getServiceUrl(String serviceKey) {
- for (Service service : access.getServiceCatalog()) {
- if (Objects.equal(service.getType(), serviceKey)) {
- String bestUrl = null;
- for (ServiceEndpoint endpoint : service.getEndpoints()) {
- bestUrl = endpoint.getPublicURL();
- if (bestUrl != null) {
- break;
- }
- }
-
- if (bestUrl != null) {
- return bestUrl;
- }
- }
- }
- return null;
- }
-
- @Override
- public void populateRequest(SimpleHttpRequest httpRequest) {
- httpRequest.setRequestHeader("X-Auth-Token", getAuthTokenValue());
- }
-
-}
\ No newline at end of file
diff --git a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticator.java b/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticator.java
deleted file mode 100644
index 49c7515f4..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/auth/client/KeystoneAuthenticator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.openstack.keystone.auth.client;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.openstack.docs.identity.api.v2.PasswordCredentials;
-import org.platformlayer.auth.AuthenticationToken;
-import org.platformlayer.auth.Authenticator;
-
-public class KeystoneAuthenticator implements Authenticator {
- final String tenantId;
-
- final String username;
- final String password;
-
- final KeystoneAuthenticationClient client;
-
- AuthenticationToken token = null;
-
- public KeystoneAuthenticator(String tenantId, String username, String password, String server) {
- this.tenantId = tenantId;
- this.username = username;
- this.password = password;
- String authenticationUrl = server != null ? server : KeystoneAuthenticationClient.DEFAULT_AUTHENTICATION_URL;
-
- this.client = new KeystoneAuthenticationClient(authenticationUrl);
- }
-
- @Override
- public AuthenticationToken getAuthenticationToken() throws KeystoneAuthenticationException {
- if (token == null) {
- PasswordCredentials passwordCredentials = new PasswordCredentials();
- passwordCredentials.setUsername(username);
- passwordCredentials.setPassword(password);
-
- token = client.authenticate(tenantId, passwordCredentials);
- }
- return token;
- }
-
- @Override
- public void clearAuthenticationToken() {
- token = null;
- }
-
- @Override
- public String getHost() {
- try {
- URL url = new URL(client.authenticationUrl);
- return url.getHost();
- } catch (MalformedURLException e) {
- throw new IllegalStateException("Error parsing URL", e);
- }
- }
-
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/AccountId.java b/auth/client/src/main/java/org/openstack/keystone/service/AccountId.java
deleted file mode 100644
index 53a7a303c..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/AccountId.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.openstack.keystone.service;
-
-import org.platformlayer.model.StringWrapper;
-
-public class AccountId extends StringWrapper {
- public AccountId(String id) {
- super(id);
- }
-
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/AuthenticationTokenValidator.java b/auth/client/src/main/java/org/openstack/keystone/service/AuthenticationTokenValidator.java
deleted file mode 100644
index 00b54fdc3..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/AuthenticationTokenValidator.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.openstack.keystone.service;
-
-import org.platformlayer.model.Authentication;
-
-public interface AuthenticationTokenValidator {
- Authentication validate(String authToken);
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/AuthenticationTokenValidatorFilter.java b/auth/client/src/main/java/org/openstack/keystone/service/AuthenticationTokenValidatorFilter.java
deleted file mode 100644
index da9dda21e..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/AuthenticationTokenValidatorFilter.java
+++ /dev/null
@@ -1,10 +0,0 @@
-//package org.openstack.keystone.service;
-//
-//import javax.inject.Inject;
-//
-//public class AuthenticationTokenValidatorFilter extends OpenstackAuthenticationFilterBase {
-// @Inject
-// public AuthenticationTokenValidatorFilter(AuthenticationTokenValidator keystoneTokenValidator) {
-// super(keystoneTokenValidator);
-// }
-// }
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/DevelopmentOpenstackAuthenticationFilter.java b/auth/client/src/main/java/org/openstack/keystone/service/DevelopmentOpenstackAuthenticationFilter.java
deleted file mode 100644
index c3b4a440a..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/DevelopmentOpenstackAuthenticationFilter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-//package org.openstack.keystone.service;
-//
-//import org.platformlayer.ApplicationMode;
-//import org.platformlayer.model.Authentication;
-//
-//public class DevelopmentOpenstackAuthenticationFilter extends OpenstackAuthenticationFilterBase {
-// public DevelopmentOpenstackAuthenticationFilter() {
-// super(new DevelopmentAuthTokenValidator());
-//
-// ApplicationMode.onlyForDevelopment();
-// }
-//
-// public static final String PREFIX = "DEV-TOKEN-";
-//
-// static class DevelopmentAuthTokenValidator implements AuthenticationTokenValidator {
-// public DevelopmentAuthTokenValidator() {
-// }
-//
-// @Override
-// public Authentication validate(String authToken) {
-// AccountId accountId = null;
-//
-// authToken = authToken.trim();
-//
-// if (authToken.startsWith(PREFIX)) {
-// String accountIdString = authToken.substring(PREFIX.length());
-// accountId = new AccountId(accountIdString);
-// }
-//
-// return accountId;
-// }
-// }
-// }
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/DevelopmentTokenValidator.java b/auth/client/src/main/java/org/openstack/keystone/service/DevelopmentTokenValidator.java
deleted file mode 100644
index 428c5e3c1..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/DevelopmentTokenValidator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.openstack.keystone.service;
-
-import javax.inject.Inject;
-
-import org.platformlayer.ApplicationMode;
-import org.platformlayer.model.Authentication;
-import org.platformlayer.model.RoleId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DevelopmentTokenValidator implements AuthenticationTokenValidator {
- static final Logger log = LoggerFactory.getLogger(DevelopmentTokenValidator.class);
-
- @Inject
- KeystoneTokenValidator keystone;
-
- public DevelopmentTokenValidator() {
- if (!ApplicationMode.isDevelopment()) {
- throw new IllegalStateException();
- }
- }
-
- public static final String PREFIX = "DEV-TOKEN-";
-
- class DevelopmentAuthentication implements Authentication {
-
- final String project;
- final String userKey;
-
- public DevelopmentAuthentication(String userKey, String project) {
- super();
- this.userKey = userKey;
- this.project = project;
- }
-
- @Override
- public String getProject() {
- return project;
- }
-
- @Override
- public boolean isInRole(String project, RoleId role) {
- return true;
- }
-
- @Override
- public byte[] getUserSecret() {
- return null;
- }
-
- @Override
- public String getUserKey() {
- return userKey;
- }
-
- }
-
- @Override
- public Authentication validate(String authToken) {
- authToken = authToken.trim();
-
- if (authToken.startsWith(PREFIX)) {
- String project = authToken.substring(PREFIX.length());
- String userKey = project;
-
- return new DevelopmentAuthentication(userKey, project);
- }
-
- return keystone.validate(authToken);
- }
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/KeystoneAuthentication.java b/auth/client/src/main/java/org/openstack/keystone/service/KeystoneAuthentication.java
deleted file mode 100644
index abcb9602d..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/KeystoneAuthentication.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.openstack.keystone.service;
-
-import java.util.List;
-
-import org.platformlayer.model.Authentication;
-import org.platformlayer.model.RoleId;
-
-public class KeystoneAuthentication implements Authentication {
- private final String userKey;
- private final String tenantKey;
- private final List roles;
- private final byte[] userSecret;
-
- public KeystoneAuthentication(String userKey, String tenantKey, byte[] userSecret, List roles) {
- this.userKey = userKey;
- this.tenantKey = tenantKey;
- this.userSecret = userSecret;
- this.roles = roles;
- }
-
- @Override
- public String getProject() {
- return tenantKey;
- }
-
- @Override
- public boolean isInRole(String project, RoleId role) {
- if (project.equals(tenantKey)) {
- return roles.contains(role.getKey());
- }
- return false;
- }
-
- @Override
- public byte[] getUserSecret() {
- return userSecret;
- }
-
- @Override
- public String getUserKey() {
- return userKey;
- }
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/KeystoneTokenValidator.java b/auth/client/src/main/java/org/openstack/keystone/service/KeystoneTokenValidator.java
deleted file mode 100644
index fd1910875..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/KeystoneTokenValidator.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.openstack.keystone.service;
-
-import java.util.List;
-
-import org.openstack.docs.identity.api.v2.Role;
-import org.openstack.docs.identity.api.v2.Tenant;
-import org.openstack.docs.identity.api.v2.UserValidation;
-import org.openstack.docs.identity.api.v2.ValidateAccess;
-import org.openstack.docs.identity.api.v2.ValidateTokenResponse;
-import org.openstack.keystone.auth.client.Keystone;
-import org.platformlayer.PlatformLayerClientException;
-import org.platformlayer.WellKnownPorts;
-import org.platformlayer.http.SimpleHttpRequest;
-import org.platformlayer.model.Authentication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Lists;
-
-public class KeystoneTokenValidator extends RestfulClient implements AuthenticationTokenValidator {
- static final Logger log = LoggerFactory.getLogger(KeystoneTokenValidator.class);
-
- public static final String DEFAULT_AUTHENTICATION_URL = "http://127.0.0.1:"
- + WellKnownPorts.PORT_PLATFORMLAYER_AUTH_ADMIN + "/";
-
- final String authenticationToken;
-
- public KeystoneTokenValidator(String baseUrl, String authenticationToken) {
- super(baseUrl);
- this.authenticationToken = authenticationToken;
- }
-
- @Override
- protected void addHeaders(SimpleHttpRequest httpRequest) {
- httpRequest.setRequestHeader(Keystone.AUTH_HEADER, authenticationToken);
- }
-
- // public KeystoneAuthenticationToken authenticate(String tenantName, PasswordCredentials passwordCredentials)
- // throws KeystoneAuthenticationException {
- // Auth auth = new Auth();
- // auth.setPasswordCredentials(passwordCredentials);
- // auth.setTenantName(tenantName);
- //
- // AuthenticateRequest request = new AuthenticateRequest();
- // request.setAuth(auth);
- //
- // AuthenticateResponse response = doSimpleRequest("POST", "tokens", request, AuthenticateResponse.class);
- // return new KeystoneAuthenticationToken(response.getAccess());
- // }
-
- @Override
- public Authentication validate(String authToken) {
- // v2.0/tokens/{userToken}[?belongsTo={tenant}]
-
- authToken = authToken.trim();
-
- String url = "v2.0/tokens/" + authToken;
-
- try {
- ValidateTokenResponse response = doSimpleRequest("GET", url, null, ValidateTokenResponse.class);
-
- ValidateAccess access = response.getAccess();
-
- Tenant tenant = access.getToken().getTenant();
- String tenantId = tenant.getId();
- if (tenantId == null) {
- return null;
- }
-
- List roles = Lists.newArrayList();
- UserValidation userInfo = access.getUser();
- for (Role role : userInfo.getRoles()) {
- if (!role.getTenantId().equals(tenantId)) {
- throw new IllegalStateException("Tenant mismatch: " + role.getTenantId() + " vs " + tenantId);
- }
- roles.add(role.getName());
- }
-
- byte[] userSecret = userInfo.getSecret();
- String userKey = userInfo.getName();
-
- KeystoneAuthentication auth = new KeystoneAuthentication(userKey, tenantId, userSecret, roles);
- return auth;
- } catch (PlatformLayerClientException e) {
- if (e.getHttpResponseCode() != null && e.getHttpResponseCode() == 404) {
- // Not found => invalid token
- return null;
- }
- throw new IllegalArgumentException("Error while validating token", e);
- }
- }
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/OpenstackAuthenticationFilterBase.java b/auth/client/src/main/java/org/openstack/keystone/service/OpenstackAuthenticationFilterBase.java
deleted file mode 100644
index 9b2547d66..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/OpenstackAuthenticationFilterBase.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.openstack.keystone.service;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
-import org.platformlayer.Scope;
-import org.platformlayer.model.Authentication;
-
-public abstract class OpenstackAuthenticationFilterBase implements Filter {
- static final Logger log = Logger.getLogger(OpenstackAuthenticationFilterBase.class);
-
- private final AuthenticationTokenValidator authenticationTokenValidator;
-
- protected OpenstackAuthenticationFilterBase(AuthenticationTokenValidator authenticationTokenValidator) {
- this.authenticationTokenValidator = authenticationTokenValidator;
- }
-
- @Override
- public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
- throws IOException, ServletException {
- Scope authenticatedScope = Scope.inherit();
-
- // Fail safe
- authenticatedScope.put(Authentication.class, null);
-
- if (servletRequest instanceof HttpServletRequest) {
- HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;
- HttpServletResponse httpServletResponse = (HttpServletResponse) servletResponse;
-
- try {
- Authentication authenticated = attemptAuthentication(httpServletRequest);
-
- if (authenticated == null) {
- httpServletResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return;
- } else {
- populateScope(authenticatedScope, authenticated);
- }
- } catch (SecurityException e) {
- httpServletResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return;
- } catch (Exception e) {
- // If we're down, don't tell the user that their password is wrong
- log.warn("Unexpected error in authentication filter", e);
- httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- return;
- }
- }
-
- authenticatedScope.push();
- try {
- filterChain.doFilter(servletRequest, servletResponse);
- } finally {
- authenticatedScope.pop();
- }
- }
-
- protected Authentication attemptAuthentication(HttpServletRequest httpServletRequest) throws Exception {
- String authToken = httpServletRequest.getHeader("X-Auth-Token");
-
- Authentication authenticated = null;
-
- if (authToken != null) {
- authenticated = authenticationTokenValidator.validate(authToken);
- }
-
- return authenticated;
- }
-
- protected void populateScope(Scope authenticatedScope, Authentication authenticated) throws Exception {
- authenticatedScope.put(Authentication.class, authenticated);
- }
-
- @Override
- public void destroy() {
-
- }
-
- @Override
- public void init(FilterConfig filterConfig) throws ServletException {
-
- }
-
-}
diff --git a/auth/client/src/main/java/org/openstack/keystone/service/RestfulClient.java b/auth/client/src/main/java/org/openstack/keystone/service/RestfulClient.java
deleted file mode 100644
index e3fc9a763..000000000
--- a/auth/client/src/main/java/org/openstack/keystone/service/RestfulClient.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.openstack.keystone.service;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.xml.bind.JAXBException;
-
-import org.apache.log4j.Logger;
-import org.openstack.keystone.auth.client.KeystoneAuthenticationException;
-import org.openstack.utils.Utf8;
-import org.platformlayer.CastUtils;
-import org.platformlayer.IoUtils;
-import org.platformlayer.PlatformLayerClientException;
-import org.platformlayer.http.SimpleHttpRequest;
-import org.platformlayer.http.SimpleHttpRequest.SimpleHttpResponse;
-import org.platformlayer.xml.JaxbHelper;
-import org.platformlayer.xml.UnmarshalException;
-
-public class RestfulClient {
- static final Logger log = Logger.getLogger(RestfulClient.class);
-
- final String baseUrl;
-
- public RestfulClient(String baseUrl) {
- this.baseUrl = baseUrl;
- }
-
- protected T doSimpleRequest(String method, String relativeUri, Object postObject, Class responseClass)
- throws PlatformLayerClientException {
- try {
- URI uri = new URI(baseUrl + relativeUri);
-
- log.info("HTTP Request: " + method + " " + uri);
-
- SimpleHttpRequest httpRequest = SimpleHttpRequest.build(method, uri);
- httpRequest.setRequestHeader("Accept", "application/xml");
-
- addHeaders(httpRequest);
-
- if (postObject != null) {
- httpRequest.setRequestHeader("Content-Type", "application/xml");
- String xml = serializeXml(postObject);
- httpRequest.getOutputStream().write(Utf8.getBytes(xml));
- }
-
- SimpleHttpResponse response = httpRequest.doRequest();
-
- int responseCode = response.getHttpResponseCode();
- switch (responseCode) {
- case 401:
- throw new KeystoneAuthenticationException("Authentication failure");
-
- case 200:
- case 203: {
- if (responseClass.equals(String.class)) {
- return CastUtils.as(IoUtils.readAll(response.getInputStream()), responseClass);
- } else {
- return deserializeXml(response.getInputStream(), responseClass);
- }
- }
-
- default:
- throw new PlatformLayerClientException("Unexpected result code: " + responseCode, null, responseCode);
- }
- } catch (IOException e) {
- throw new KeystoneAuthenticationException("Error communicating with service", e);
- } catch (URISyntaxException e) {
- throw new KeystoneAuthenticationException("Error building URI", e);
- }
-
- }
-
- protected void addHeaders(SimpleHttpRequest httpRequest) {
-
- }
-
- T deserializeXml(InputStream is, Class clazz) throws KeystoneAuthenticationException {
- try {
- return JaxbHelper.deserializeXmlObject(is, clazz, true);
- } catch (UnmarshalException e) {
- throw new KeystoneAuthenticationException("Error reading authentication response data", e);
- }
- }
-
- String serializeXml(Object object) throws KeystoneAuthenticationException {
- try {
- boolean formatted = false;
- return JaxbHelper.toXml(object, formatted);
- } catch (JAXBException e) {
- throw new KeystoneAuthenticationException("Error serializing data", e);
- }
- }
-}
diff --git a/auth/client/src/main/java/org/platformlayer/auth/AuthenticationToken.java b/auth/client/src/main/java/org/platformlayer/auth/AuthenticationToken.java
deleted file mode 100644
index 0496bf2c4..000000000
--- a/auth/client/src/main/java/org/platformlayer/auth/AuthenticationToken.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.platformlayer.auth;
-
-import org.platformlayer.http.SimpleHttpRequest;
-
-public interface AuthenticationToken {
- String getServiceUrl(String serviceKey);
-
- void populateRequest(SimpleHttpRequest httpRequest);
-}
diff --git a/auth/client/src/main/java/org/platformlayer/auth/Authenticator.java b/auth/client/src/main/java/org/platformlayer/auth/Authenticator.java
index af5d52b78..0beb2bb60 100644
--- a/auth/client/src/main/java/org/platformlayer/auth/Authenticator.java
+++ b/auth/client/src/main/java/org/platformlayer/auth/Authenticator.java
@@ -1,9 +1,14 @@
package org.platformlayer.auth;
+import java.io.PrintStream;
+
+
public interface Authenticator {
- AuthenticationToken getAuthenticationToken() throws OpenstackAuthenticationException;
+ AuthenticationToken getAuthenticationToken() throws PlatformlayerAuthenticationClientException;
void clearAuthenticationToken();
String getHost();
+
+ void setDebug(PrintStream debug);
}
diff --git a/auth/client/src/main/java/org/platformlayer/auth/OpenstackAuthenticationException.java b/auth/client/src/main/java/org/platformlayer/auth/OpenstackAuthenticationException.java
deleted file mode 100644
index 8edc412f9..000000000
--- a/auth/client/src/main/java/org/platformlayer/auth/OpenstackAuthenticationException.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.platformlayer.auth;
-
-import org.platformlayer.PlatformLayerClientException;
-
-public class OpenstackAuthenticationException extends PlatformLayerClientException {
- private static final long serialVersionUID = 1L;
-
- public OpenstackAuthenticationException(String message) {
- super(message);
- }
-
- public OpenstackAuthenticationException(String message, Exception e) {
- super(message, e);
- }
-}
diff --git a/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerAuthenticationClientException.java b/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerAuthenticationClientException.java
new file mode 100644
index 000000000..c03925196
--- /dev/null
+++ b/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerAuthenticationClientException.java
@@ -0,0 +1,13 @@
+package org.platformlayer.auth;
+
+public class PlatformlayerAuthenticationClientException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public PlatformlayerAuthenticationClientException(String message) {
+ super(message);
+ }
+
+ public PlatformlayerAuthenticationClientException(String message, Exception e) {
+ super(message, e);
+ }
+}
diff --git a/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerAuthenticationToken.java b/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerAuthenticationToken.java
new file mode 100644
index 000000000..008e5c393
--- /dev/null
+++ b/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerAuthenticationToken.java
@@ -0,0 +1,76 @@
+package org.platformlayer.auth;
+
+import org.platformlayer.auth.v1.Access;
+import org.platformlayer.http.HttpRequest;
+
+public class PlatformlayerAuthenticationToken implements AuthenticationToken {
+ private final String authToken;
+
+ public PlatformlayerAuthenticationToken(String authToken) {
+ this.authToken = authToken;
+ }
+
+ public PlatformlayerAuthenticationToken(Access access) {
+ this.authToken = access.getToken().getId();
+ }
+
+ public String getAuthTokenValue() {
+ return authToken;
+ }
+
+ // @Override
+ // public String getServiceUrl(String serviceKey) {
+ // // for (Service service : access.getServiceCatalog()) {
+ // // if (Objects.equal(service.getType(), serviceKey)) {
+ // // String bestUrl = null;
+ // // for (ServiceEndpoint endpoint : service.getEndpoints()) {
+ // // bestUrl = endpoint.getPublicURL();
+ // // if (bestUrl != null) {
+ // // break;
+ // // }
+ // // }
+ // //
+ // // if (bestUrl != null) {
+ // // return bestUrl;
+ // // }
+ // // }
+ // // }
+ // return null;
+ // }
+
+ @Override
+ public void populateRequest(HttpRequest httpRequest) {
+ httpRequest.setRequestHeader("X-Auth-Token", getAuthTokenValue());
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((authToken == null) ? 0 : authToken.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ PlatformlayerAuthenticationToken other = (PlatformlayerAuthenticationToken) obj;
+ if (authToken == null) {
+ if (other.authToken != null) {
+ return false;
+ }
+ } else if (!authToken.equals(other.authToken)) {
+ return false;
+ }
+ return true;
+ }
+
+}
\ No newline at end of file
diff --git a/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerInvalidCredentialsException.java b/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerInvalidCredentialsException.java
new file mode 100644
index 000000000..14010efb3
--- /dev/null
+++ b/auth/client/src/main/java/org/platformlayer/auth/PlatformlayerInvalidCredentialsException.java
@@ -0,0 +1,11 @@
+package org.platformlayer.auth;
+
+
+public class PlatformlayerInvalidCredentialsException extends PlatformlayerAuthenticationClientException {
+ private static final long serialVersionUID = 1L;
+
+ public PlatformlayerInvalidCredentialsException(String message) {
+ super(message);
+ }
+
+}
diff --git a/auth/client/src/main/java/org/platformlayer/auth/test/OpenstackAuthenticationClient.java b/auth/client/src/main/java/org/platformlayer/auth/test/OpenstackAuthenticationClient.java
deleted file mode 100644
index 2ce9782ed..000000000
--- a/auth/client/src/main/java/org/platformlayer/auth/test/OpenstackAuthenticationClient.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package org.platformlayer.auth.test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.Random;
-
-import org.platformlayer.auth.OpenstackAuthenticationException;
-import org.platformlayer.http.SimpleHttpRequest;
-import org.platformlayer.http.SimpleHttpRequest.SimpleHttpResponse;
-import org.platformlayer.xml.JaxbHelper;
-import org.platformlayer.xml.UnmarshalException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OpenstackAuthenticationClient {
- static final Logger log = LoggerFactory.getLogger(OpenstackAuthenticationClient.class);
-
- final String username;
- final private String secret;
-
- OpenstackAuthenticationToken authenticationToken;
-
- private String authenticationUrl = URL_AUTHENTICATE;
-
- static final String URL_AUTHENTICATE = "https://auth.api.rackspacecloud.com/v1.0";
-
- public static final Integer HTTP_500_ERROR = new Integer(500);
-
- protected static final int MAX_RETRIES = 10;
-
- static Random random = new Random();
-
- public OpenstackAuthenticationClient(String username, String secret) {
- this.username = username;
- this.secret = secret;
- }
-
- public synchronized OpenstackAuthenticationToken getAuthenticationToken() throws OpenstackAuthenticationException {
- if (authenticationToken == null) {
- authenticationToken = authenticate();
- }
-
- return authenticationToken;
- }
-
- private OpenstackAuthenticationToken authenticate() throws OpenstackAuthenticationException {
- if (username == null || secret == null) {
- throw new OpenstackAuthenticationException("Username and secret are both required");
- }
-
- try {
- // GET /v1.0 HTTP/1.1
- // Host: auth.api.rackspacecloud.com
- // X-Auth-User: jdoe
- // X-Auth-Key: a86850deb2742ec3cb41518e26aa2d89
- URI uri = new URI(authenticationUrl);
-
- SimpleHttpRequest httpRequest = SimpleHttpRequest.build("GET", uri);
- httpRequest.setRequestHeader("X-Auth-User", this.username);
- httpRequest.setRequestHeader("X-Auth-Key", this.secret);
-
- SimpleHttpResponse response = httpRequest.doRequest();
-
- int responseCode = response.getHttpResponseCode();
- switch (responseCode) {
- case 401:
- throw new OpenstackAuthenticationException("Openstack credentials were not correct");
-
- case 204:
- /*
- * If authentication is successful, an HTTP status 204 No Content is returned with three cloud service
- * headers, X-Server-Management-Url, X-Storage-Url, X-CDN-Management-Url, as well as X-Auth-Token
- */
-
- String authToken = getRequiredHeader(response, "X-Auth-Token");
-
- Map allHeaders = response.getHeadersRemoveDuplicates();
-
- return new OpenstackAuthenticationToken(authToken, allHeaders);
-
- default:
- throw new OpenstackAuthenticationException("Unexpected return code from Rackspace Cloud during login: "
- + responseCode);
- }
- } catch (IOException e) {
- throw new OpenstackAuthenticationException("Error communicating with authentication service", e);
- } catch (URISyntaxException e) {
- throw new OpenstackAuthenticationException("Error building rackspace URI", e);
- }
- }
-
- private static String getRequiredHeader(SimpleHttpResponse response, String headerName)
- throws OpenstackAuthenticationException {
- String headerValue = response.getResponseHeaderField(headerName);
- if (headerValue == null) {
- throw new OpenstackAuthenticationException("Did not find required header: " + headerName);
- }
- return headerValue;
- }
-
- public static T deserializeXml(InputStream is, Class clazz) throws OpenstackAuthenticationException {
- try {
- return JaxbHelper.deserializeXmlObject(is, clazz, true);
- } catch (UnmarshalException e) {
- throw new OpenstackAuthenticationException("Error reading authentication response data", e);
- }
- }
-
- public String getAuthenticationUrl() {
- return authenticationUrl;
- }
-
- public void setAuthenticationUrl(String authenticationUrl) {
- this.authenticationUrl = authenticationUrl;
- }
-
- public OpenstackAuthenticationToken reauthenticate() throws OpenstackAuthenticationException {
- this.authenticationToken = null;
- return getAuthenticationToken();
- }
-}
diff --git a/auth/client/src/main/java/org/platformlayer/auth/test/OpenstackAuthenticationToken.java b/auth/client/src/main/java/org/platformlayer/auth/test/OpenstackAuthenticationToken.java
deleted file mode 100644
index 2c9e5556d..000000000
--- a/auth/client/src/main/java/org/platformlayer/auth/test/OpenstackAuthenticationToken.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.platformlayer.auth.test;
-
-import java.util.Map;
-
-public class OpenstackAuthenticationToken {
- private final String authToken;
- private final Map allHeaders;
-
- public OpenstackAuthenticationToken(String authToken, Map allHeaders) {
- this.authToken = authToken;
- this.allHeaders = allHeaders;
- }
-
- public String getHeaderValue(String key) {
- return allHeaders.get(key);
- }
-
- public String getAuthTokenValue() {
- return authToken;
- }
-
-}
\ No newline at end of file
diff --git a/auth/client/src/main/schemas/keystone.xsd b/auth/client/src/main/schemas/keystone.xsd
index d749e0e31..bdcbe4faf 100644
--- a/auth/client/src/main/schemas/keystone.xsd
+++ b/auth/client/src/main/schemas/keystone.xsd
@@ -1,5 +1,5 @@
-
+
@@ -9,15 +9,21 @@
-
+
-
+
+
+
+
+
+
+
-
+
-
+
@@ -25,10 +31,17 @@
-
+
+
+
+
+
+
+
-
+
+
@@ -36,158 +49,141 @@
-
-
+
-
+
+
-
-
-
-
+
-
+
-
+
+
-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
-
-
-
-
+
-
-
+
-
-
+
-
+
-
-
-
-
+
+
+
-
+
-
-
-
+
-
+
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
-
-
-
+
-
+
+
+
-
+
-
+
+
-
-
-
-
+
+
+
+
-
+
-
+
+
+
+
-
+
-
+
+
-
+
-
+
+
+
-
-
-
-
+
-
-
+
+
-
+
-
+
+
diff --git a/auth/conf.db/system.conf b/auth/conf.db/system.conf
index 174d63001..fc1a9ea65 100644
--- a/auth/conf.db/system.conf
+++ b/auth/conf.db/system.conf
@@ -7,3 +7,12 @@ auth.jdbc.username=platformlayer_ops
auth.jdbc.password=platformlayer-password
sharedsecret=SHAREDSECRET
+
+keystore=/home/justinsb/.credentials/ssl/dev.jks
+
+metrics.report.ssl.cert=clientcert.systemauth
+metrics.report.url=https://127.0.0.1:8099/
+metrics.report.project=platformlayer
+
+metrics.report.ssl.keys=7b0ccb3d377f815496fce615ce6b4c09
+
diff --git a/auth/conf.db/user.conf b/auth/conf.db/user.conf
index 96dff3660..bf155532d 100644
--- a/auth/conf.db/user.conf
+++ b/auth/conf.db/user.conf
@@ -7,3 +7,13 @@ auth.jdbc.password=platformlayer-password
sharedsecret=SHAREDSECRET
+
+keystore=/home/justinsb/.credentials/ssl/dev.jks
+
+
+metrics.report.ssl.cert=clientcert.systemauth
+metrics.report.url=https://127.0.0.1:8099/
+metrics.report.project=platformlayer
+
+metrics.report.ssl.keys=7b0ccb3d377f815496fce615ce6b4c09
+
diff --git a/auth/keystone-api/pom.xml b/auth/keystone-api/pom.xml
deleted file mode 100644
index 468ffbdd1..000000000
--- a/auth/keystone-api/pom.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
- 4.0.0
-
-
- org.platformlayer
- keystone-parent
- 1.0-SNAPSHOT
-
-
- keystone-api
- Keystone :: API
-
-
-
- org.platformlayer
- model-shared
-
-
-
diff --git a/auth/keystone-api/src/main/java/org/openstack/keystone/services/AuthenticationInfo.java b/auth/keystone-api/src/main/java/org/openstack/keystone/services/AuthenticationInfo.java
deleted file mode 100644
index 619aabdbb..000000000
--- a/auth/keystone-api/src/main/java/org/openstack/keystone/services/AuthenticationInfo.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.openstack.keystone.services;
-
-public class AuthenticationInfo {
- final String userId;
- final byte[] tokenSecret;
-
- public AuthenticationInfo(String userId, byte[] tokenSecret) {
- this.userId = userId;
- this.tokenSecret = tokenSecret;
- }
-
- public String getUserId() {
- return userId;
- }
-
- public byte[] getTokenSecret() {
- return tokenSecret;
- }
-}
diff --git a/auth/keystone-api/src/main/java/org/openstack/keystone/services/GenericAuthenticator.java b/auth/keystone-api/src/main/java/org/openstack/keystone/services/GenericAuthenticator.java
deleted file mode 100644
index c723dee23..000000000
--- a/auth/keystone-api/src/main/java/org/openstack/keystone/services/GenericAuthenticator.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.openstack.keystone.services;
-
-public interface GenericAuthenticator {
- AuthenticationInfo authenticate(String username, String password) throws AuthenticatorException;
-
- GroupMembershipOracle getGroupMembership();
-
- byte[] getUserSecret(String userId, byte[] tokenSecret) throws AuthenticatorException;
-}
diff --git a/auth/keystone-api/src/main/java/org/openstack/keystone/services/GroupMembershipOracle.java b/auth/keystone-api/src/main/java/org/openstack/keystone/services/GroupMembershipOracle.java
deleted file mode 100644
index 61df56a17..000000000
--- a/auth/keystone-api/src/main/java/org/openstack/keystone/services/GroupMembershipOracle.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.openstack.keystone.services;
-
-import java.util.List;
-
-public interface GroupMembershipOracle {
- List getGroups(String key, boolean isGroup) throws AuthenticatorException;
-}
diff --git a/auth/keystone-api/src/main/java/org/openstack/keystone/services/SystemAuthenticator.java b/auth/keystone-api/src/main/java/org/openstack/keystone/services/SystemAuthenticator.java
deleted file mode 100644
index 4df741e27..000000000
--- a/auth/keystone-api/src/main/java/org/openstack/keystone/services/SystemAuthenticator.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.openstack.keystone.services;
-
-public interface SystemAuthenticator extends GenericAuthenticator {
-
-}
diff --git a/auth/keystone-api/src/main/java/org/openstack/keystone/services/SystemAuthenticatorAdaptor.java b/auth/keystone-api/src/main/java/org/openstack/keystone/services/SystemAuthenticatorAdaptor.java
deleted file mode 100644
index 92e759387..000000000
--- a/auth/keystone-api/src/main/java/org/openstack/keystone/services/SystemAuthenticatorAdaptor.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.openstack.keystone.services;
-
-public class SystemAuthenticatorAdaptor implements SystemAuthenticator {
- final GenericAuthenticator authenticator;
-
- public SystemAuthenticatorAdaptor(GenericAuthenticator authenticator) {
- this.authenticator = authenticator;
- }
-
- @Override
- public AuthenticationInfo authenticate(String username, String password) throws AuthenticatorException {
- return authenticator.authenticate(username, password);
- }
-
- @Override
- public GroupMembershipOracle getGroupMembership() {
- return authenticator.getGroupMembership();
- }
-
- @Override
- public byte[] getUserSecret(String userId, byte[] tokenSecret) throws AuthenticatorException {
- return authenticator.getUserSecret(userId, tokenSecret);
- }
-}
\ No newline at end of file
diff --git a/auth/keystone-api/src/main/java/org/openstack/keystone/services/UserAuthenticator.java b/auth/keystone-api/src/main/java/org/openstack/keystone/services/UserAuthenticator.java
deleted file mode 100644
index 2e7b09637..000000000
--- a/auth/keystone-api/src/main/java/org/openstack/keystone/services/UserAuthenticator.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.openstack.keystone.services;
-
-public interface UserAuthenticator extends GenericAuthenticator {
-}
diff --git a/auth/keystone-api/src/main/java/org/openstack/keystone/services/UserAuthenticatorAdaptor.java b/auth/keystone-api/src/main/java/org/openstack/keystone/services/UserAuthenticatorAdaptor.java
deleted file mode 100644
index 08a76b81c..000000000
--- a/auth/keystone-api/src/main/java/org/openstack/keystone/services/UserAuthenticatorAdaptor.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.openstack.keystone.services;
-
-public class UserAuthenticatorAdaptor implements UserAuthenticator {
- final GenericAuthenticator authenticator;
-
- public UserAuthenticatorAdaptor(GenericAuthenticator authenticator) {
- this.authenticator = authenticator;
- }
-
- @Override
- public AuthenticationInfo authenticate(String username, String password) throws AuthenticatorException {
- return authenticator.authenticate(username, password);
- }
-
- @Override
- public GroupMembershipOracle getGroupMembership() {
- return authenticator.getGroupMembership();
- }
-
- @Override
- public byte[] getUserSecret(String userId, byte[] tokenSecret) throws AuthenticatorException {
- return authenticator.getUserSecret(userId, tokenSecret);
- }
-}
\ No newline at end of file
diff --git a/auth/keystone-cli/pom.xml b/auth/keystone-cli/pom.xml
index 2b3497a13..284db0e36 100644
--- a/auth/keystone-cli/pom.xml
+++ b/auth/keystone-cli/pom.xml
@@ -1,44 +1,87 @@
- 4.0.0
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
-
- org.platformlayer
- keystone-parent
- 1.0-SNAPSHOT
-
+
+ org.platformlayer
+ keystone-parent
+ 1.0-SNAPSHOT
+
- keystone-cli
- Keystone :: CLI
+ keystone-cli
+ Keystone :: CLI
-
-
- org.platformlayer
- keystone-api
-
-
-
- org.platformlayer
- shared-cli
-
+
+
+ com.fathomdb
+ fathomdb-cli
+
-
- org.platformlayer
- platformlayer-auth
-
-
- postgresql
- postgresql
-
+
+ org.platformlayer
+ platformlayer-auth
+
+
+ postgresql
+ postgresql
+
-
- org.slf4j
- slf4j-log4j12
-
-
-
-
+
+ ch.qos.logback
+ logback-classic
+
+
+
+ com.google.inject
+ guice
+
+
+
+ com.fathomdb
+ fathomdb-http
+
+
+
+ com.fathomdb
+ fathomdb-metrics
+ 1.0-SNAPSHOT
+
+
+
+
+ postgresql
+ postgresql
+
+
+
+
+ org.apache.tomcat
+ tomcat-jdbc
+
+
+
+
+
+ eu.somatik.serviceloader-maven-plugin
+ serviceloader-maven-plugin
+ 1.0.2
+
+
+ com.fathomdb.cli.commands.CommandRunner
+ com.fathomdb.cli.formatter.Formatter
+
+
+
+
+
+ generate
+
+
+
+
+
+
org.apache.maven.plugins
maven-shade-plugin
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliContext.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliContext.java
index 48496520f..698374989 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliContext.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliContext.java
@@ -1,17 +1,36 @@
package org.platformlayer.keystone.cli;
+import java.io.File;
+import java.io.IOException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.util.List;
+import java.util.Properties;
+
import org.platformlayer.RepositoryException;
-import org.platformlayer.auth.OpsUser;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.KeystoneJdbcModule;
+import org.platformlayer.auth.UserDatabase;
+import org.platformlayer.auth.UserEntity;
+import org.platformlayer.config.ConfigurationModule;
+import org.platformlayer.crypto.CertificateReader;
import org.platformlayer.keystone.cli.commands.KeystoneCommandRegistry;
import org.platformlayer.keystone.cli.formatters.KeystoneFormatterRegistry;
-import org.platformlayer.keystone.cli.guice.CliModule;
+import org.platformlayer.metrics.NullMetricsModule;
+import org.platformlayer.ops.OpsException;
import com.fathomdb.cli.CliContextBase;
import com.fathomdb.cli.CliException;
+import com.fathomdb.config.ConfigurationImpl;
+import com.fathomdb.crypto.KeyStoreUtils;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
import com.google.inject.ConfigurationException;
import com.google.inject.Guice;
import com.google.inject.Injector;
+import com.google.inject.Module;
public class KeystoneCliContext extends CliContextBase {
final KeystoneCliOptions options;
@@ -24,33 +43,84 @@ public KeystoneCliContext(KeystoneCommandRegistry commandRegistry, KeystoneCliOp
@Override
public void connect() throws Exception {
- this.injector = Guice.createInjector(new CliModule(options));
+ Properties properties = options.getConfigurationProperties();
+ ConfigurationImpl configuration = ConfigurationImpl.from(new File("."), properties);
+
+ List modules = Lists.newArrayList();
+
+ modules.add(new ConfigurationModule(configuration));
+ modules.add(new KeystoneJdbcModule());
+ modules.add(new NullMetricsModule());
+
+ this.injector = Guice.createInjector(modules);
}
- public UserRepository getUserRepository() {
+ public UserDatabase getUserRepository() {
try {
- return injector.getInstance(UserRepository.class);
+ return injector.getInstance(UserDatabase.class);
} catch (ConfigurationException e) {
throw new CliException("Database not configured; must set auth.system.module in configuration");
}
}
- public OpsUser login() throws RepositoryException {
+ /**
+ * Logs in the current user, directly accessing the database
+ */
+ public UserEntity loginDirect() throws RepositoryException {
String username = options.getUsername();
String password = options.getPassword();
if (username == null || password == null) {
throw new IllegalArgumentException("Must specify username & password");
}
- OpsUser user = getUserRepository().findUser(username);
- if (user != null) {
- if (!user.isPasswordMatch(password)) {
- user = null;
- }
- }
+
+ UserEntity user = (UserEntity) getUserRepository().authenticateWithPassword(username, password);
if (user == null) {
throw new SecurityException("Credentials were not valid");
}
- user.unlockWithPassword(password);
return user;
}
+
+ public KeystoneCliOptions getOptions() {
+ return options;
+ }
+
+ public Certificate[] getCertificateChain(String keystore, String keystoreSecret, String keyAlias)
+ throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
+ if (getOptions().isServerMode()) {
+ throw new IllegalArgumentException("Files not supported in server mode");
+ }
+
+ if (keystoreSecret == null) {
+ keystoreSecret = KeyStoreUtils.DEFAULT_KEYSTORE_SECRET;
+ }
+
+ KeyStore keyStore = KeyStoreUtils.load(new File(keystore), keystoreSecret);
+
+ if (keyAlias == null) {
+ List keyAliases = KeyStoreUtils.getKeyAliases(keyStore);
+ if (keyAliases.size() == 0) {
+ throw new CliException("No keys found in keystore");
+ }
+ if (keyAliases.size() != 1) {
+ System.out.println("Found keys:\n\t" + Joiner.on("\n\t").join(keyAliases));
+ throw new CliException("Multiple keys found in keystore; specify --alias");
+ }
+
+ keyAlias = keyAliases.get(0);
+ }
+
+ Certificate[] certificateChain = keyStore.getCertificateChain(keyAlias);
+
+ return certificateChain;
+ }
+
+ public Certificate[] loadCertificateChain(String certPath) throws IOException, OpsException {
+ if (getOptions().isServerMode()) {
+ throw new IllegalArgumentException("Files not supported in server mode");
+ }
+
+ CertificateReader reader = new CertificateReader();
+ Certificate[] certificates = reader.parse(new File(certPath));
+ return certificates;
+ }
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliOptions.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliOptions.java
index 38a41ed2a..cee9f3bf1 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliOptions.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/KeystoneCliOptions.java
@@ -8,10 +8,10 @@
import java.util.Properties;
import org.kohsuke.args4j.Option;
-import org.openstack.utils.Io;
-import org.openstack.utils.NoCloseInputStream;
import com.fathomdb.cli.CliOptions;
+import com.fathomdb.io.IoUtils;
+import com.fathomdb.io.NoCloseInputStream;
public class KeystoneCliOptions extends CliOptions {
@Option(name = "-c", aliases = "--config", usage = "specify configuration file")
@@ -40,7 +40,7 @@ public Properties getConfigurationProperties() {
if (isServerMode()) {
throw new IllegalArgumentException("Must pass config file over stdin in server mode");
}
- File file = Io.resolve(configFile);
+ File file = IoUtils.resolve(configFile);
if (!file.exists()) {
throw new FileNotFoundException("Configuration file not found: " + file);
}
@@ -56,7 +56,7 @@ public Properties getConfigurationProperties() {
} catch (IOException e) {
throw new IllegalArgumentException("Error reading configuration file", e);
} finally {
- Io.safeClose(is);
+ IoUtils.safeClose(is);
}
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/ProjectNameAutoCompleter.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/ProjectNameAutoCompleter.java
index 6ad84c2d2..6ffa5596e 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/ProjectNameAutoCompleter.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/ProjectNameAutoCompleter.java
@@ -2,7 +2,7 @@
import java.util.List;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.UserDatabase;
import org.platformlayer.keystone.cli.KeystoneCliContext;
import com.fathomdb.cli.CliContext;
@@ -18,7 +18,7 @@ public List doComplete(CliContext context, String prefix) throws Excepti
}
KeystoneCliContext keystoneContext = (KeystoneCliContext) context;
- UserRepository userRepository = keystoneContext.getUserRepository();
+ UserDatabase userRepository = keystoneContext.getUserRepository();
List userIds = userRepository.listAllProjectNames(prefix);
addSuffix(userIds, " ");
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/UserNameAutoCompleter.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/UserNameAutoCompleter.java
index fac8421b3..1384d601a 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/UserNameAutoCompleter.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/autocomplete/UserNameAutoCompleter.java
@@ -2,7 +2,7 @@
import java.util.List;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.UserDatabase;
import org.platformlayer.keystone.cli.KeystoneCliContext;
import com.fathomdb.cli.CliContext;
@@ -18,7 +18,7 @@ public List doComplete(CliContext context, String prefix) throws Excepti
}
KeystoneCliContext keystoneContext = (KeystoneCliContext) context;
- UserRepository userRepository = keystoneContext.getUserRepository();
+ UserDatabase userRepository = keystoneContext.getUserRepository();
List userIds = userRepository.listAllUserNames(prefix);
addSuffix(userIds, " ");
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateProject.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateProject.java
index 3b09b48af..6286d63bb 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateProject.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateProject.java
@@ -2,12 +2,14 @@
import org.kohsuke.args4j.Argument;
import org.platformlayer.RepositoryException;
-import org.platformlayer.auth.OpsProject;
-import org.platformlayer.auth.OpsUser;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.ProjectEntity;
+import org.platformlayer.auth.UserDatabase;
+import org.platformlayer.auth.UserEntity;
+
+import com.fathomdb.cli.CliException;
public class CreateProject extends KeystoneCommandRunnerBase {
- @Argument(index = 0)
+ @Argument(index = 0, required = true, usage = "Project key")
public String projectKey;
public CreateProject() {
@@ -16,12 +18,16 @@ public CreateProject() {
@Override
public Object runCommand() throws RepositoryException {
- UserRepository userRepository = getContext().getUserRepository();
+ UserDatabase userRepository = getContext().getUserRepository();
// We need to login to unlock the user key so we can encrypt the project key!
- OpsUser me = getContext().login();
+ UserEntity me = getContext().loginDirect();
+
+ if (projectKey.contains("@@")) {
+ throw new CliException("Project names with @@ are reserved for system uses");
+ }
- OpsProject project = userRepository.createProject(projectKey, me);
+ ProjectEntity project = userRepository.createProject(projectKey, me);
return project;
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateServiceAccount.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateServiceAccount.java
new file mode 100644
index 000000000..0f6e34296
--- /dev/null
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateServiceAccount.java
@@ -0,0 +1,43 @@
+package org.platformlayer.keystone.cli.commands;
+
+import java.security.cert.Certificate;
+import java.security.cert.X509Certificate;
+
+import org.kohsuke.args4j.Option;
+import org.platformlayer.auth.ServiceAccount;
+import org.platformlayer.auth.UserDatabase;
+
+public class CreateServiceAccount extends KeystoneCommandRunnerBase {
+ @Option(name = "-k", aliases = "--key", usage = "keystore", required = true)
+ public String keystore;
+
+ @Option(name = "-s", aliases = "--secret", usage = "keystore secret")
+ public String keystoreSecret;
+
+ @Option(name = "-a", aliases = "--alias", usage = "key alias")
+ public String keyAlias;
+
+ public CreateServiceAccount() {
+ super("create", "serviceaccount");
+ }
+
+ @Override
+ public Object runCommand() throws Exception {
+ Certificate[] certificateChain = getContext().getCertificateChain(keystore, keystoreSecret, keyAlias);
+
+ X509Certificate cert;
+ if (certificateChain.length == 1) {
+ cert = (X509Certificate) certificateChain[0];
+ } else {
+ System.out.println("Certificate chain has length " + certificateChain.length + ", assuming entry 2 is CA");
+ cert = (X509Certificate) certificateChain[1];
+ }
+
+ UserDatabase userRepository = getContext().getUserRepository();
+
+ ServiceAccount account = userRepository.createServiceAccount(cert);
+
+ return account;
+ }
+
+}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateUser.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateUser.java
index 0e4d670f8..cc05cb6f6 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateUser.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/CreateUser.java
@@ -1,27 +1,57 @@
package org.platformlayer.keystone.cli.commands;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.cert.Certificate;
+
import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
import org.platformlayer.RepositoryException;
import org.platformlayer.auth.OpsUser;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.UserDatabase;
+import org.platformlayer.ops.OpsException;
+
+import com.fathomdb.cli.CliException;
public class CreateUser extends KeystoneCommandRunnerBase {
- @Argument(index = 0, required = true)
+ @Argument(index = 0, required = true, usage = "username")
public String username;
- @Argument(index = 1, required = true)
+ @Option(name = "-p", aliases = "--password", usage = "password")
public String password;
+ @Option(name = "-c", aliases = "--cert", usage = "certificate")
+ public String certPath;
+
+ @Option(name = "-k", aliases = "--key", usage = "keystore")
+ public String keystore;
+
+ @Option(name = "-s", aliases = "--secret", usage = "keystore secret")
+ public String keystoreSecret;
+
+ @Option(name = "-a", aliases = "--alias", usage = "key alias")
+ public String keyAlias;
+
public CreateUser() {
super("create", "user");
}
@Override
- public Object runCommand() throws RepositoryException {
- UserRepository userRepository = getContext().getUserRepository();
+ public Object runCommand() throws RepositoryException, GeneralSecurityException, IOException, OpsException {
+ if (password == null && keystore == null && certPath == null) {
+ throw new CliException("Either key or password or cert is required");
+ }
+
+ UserDatabase userRepository = getContext().getUserRepository();
+ Certificate[] certificateChain = null;
- OpsUser user = userRepository.createUser(username, password);
+ if (keystore != null) {
+ certificateChain = getContext().getCertificateChain(keystore, keystoreSecret, keyAlias);
+ } else if (certPath != null) {
+ certificateChain = getContext().loadCertificateChain(certPath);
+ }
+ OpsUser user = userRepository.createUser(username, password, certificateChain);
return user;
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/JoinProject.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/JoinProject.java
index 64f043ad6..3e382c894 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/JoinProject.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/JoinProject.java
@@ -1,19 +1,21 @@
package org.platformlayer.keystone.cli.commands;
import java.io.IOException;
-
-import javax.crypto.SecretKey;
+import java.util.Collections;
import org.kohsuke.args4j.Argument;
import org.platformlayer.RepositoryException;
-import org.platformlayer.auth.OpsProject;
-import org.platformlayer.auth.OpsUser;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.ProjectEntity;
+import org.platformlayer.auth.UserDatabase;
+import org.platformlayer.auth.UserEntity;
import org.platformlayer.auth.crypto.SecretStore;
import org.platformlayer.keystone.cli.model.ProjectName;
import org.platformlayer.keystone.cli.model.UserName;
+import org.platformlayer.model.RoleId;
import com.fathomdb.cli.CliException;
+import com.fathomdb.crypto.CryptoKey;
+import com.google.common.base.Strings;
public class JoinProject extends KeystoneCommandRunnerBase {
@Argument(index = 0, required = true, metaVar = "username")
@@ -22,30 +24,37 @@ public class JoinProject extends KeystoneCommandRunnerBase {
@Argument(index = 1, required = true, metaVar = "project")
public ProjectName projectKey;
+ @Argument(index = 2, required = true, metaVar = "role")
+ public String roleKey;
+
public JoinProject() {
super("join", "project");
}
@Override
public Object runCommand() throws RepositoryException, IOException {
- UserRepository userRepository = getContext().getUserRepository();
+ UserDatabase userRepository = getContext().getUserRepository();
- OpsUser me = getContext().login();
- OpsProject project = userRepository.findProjectByKey(projectKey.getKey());
+ UserEntity me = getContext().loginDirect();
+ ProjectEntity project = userRepository.findProjectByKey(projectKey.getKey());
if (project == null) {
throw new CliException("Project not found: " + projectKey.getKey());
}
SecretStore secretStore = new SecretStore(project.secretData);
- SecretKey projectKey = secretStore.getSecretFromUser(me);
- if (projectKey == null) {
+ CryptoKey projectSecret = secretStore.getSecretFromUser(me);
+ if (projectSecret == null) {
String msg = "Cannot retrieve project secret.";
- msg += " Is " + me.key + " a member of " + project.key + "?";
+ msg += " Is " + me.key + " a member of " + project.getName() + "?";
throw new CliException(msg);
}
- userRepository.addUserToProject(username.getKey(), project.key, projectKey);
+ if (Strings.isNullOrEmpty(roleKey)) {
+ throw new CliException("Role is required");
+ }
+ RoleId role = new RoleId(roleKey);
+ userRepository.addUserToProject(username.getKey(), project.getName(), projectSecret,
+ Collections.singletonList(role));
return project;
}
-
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/KeystoneCommandRegistry.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/KeystoneCommandRegistry.java
index e60f1cc58..03ccc8136 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/KeystoneCommandRegistry.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/KeystoneCommandRegistry.java
@@ -1,17 +1,18 @@
package org.platformlayer.keystone.cli.commands;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.fathomdb.cli.commands.AutoComplete;
import com.fathomdb.cli.commands.CommandRegistryBase;
public class KeystoneCommandRegistry extends CommandRegistryBase {
- static final Logger log = Logger.getLogger(KeystoneCommandRegistry.class);
+ static final Logger log = LoggerFactory.getLogger(KeystoneCommandRegistry.class);
public KeystoneCommandRegistry() {
addCommand(new AutoComplete());
- discoverCommands(getClass().getPackage());
+ discoverCommands();
}
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListProjects.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListProjects.java
index c3f11cff6..c3cf436e3 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListProjects.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListProjects.java
@@ -2,8 +2,8 @@
import org.kohsuke.args4j.Argument;
import org.platformlayer.RepositoryException;
-import org.platformlayer.auth.OpsUser;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.UserDatabase;
+import org.platformlayer.auth.UserEntity;
import org.platformlayer.keystone.cli.model.UserName;
public class ListProjects extends KeystoneCommandRunnerBase {
@@ -16,12 +16,12 @@ public ListProjects() {
@Override
public Object runCommand() throws RepositoryException {
- UserRepository userRepository = getContext().getUserRepository();
+ UserDatabase userRepository = getContext().getUserRepository();
// if (username == null) {
// return userRepository.listAllProjectNames(null);
// } else {
- OpsUser user = userRepository.findUser(username.getKey());
+ UserEntity user = (UserEntity) userRepository.findUser(username.getKey());
if (user == null) {
throw new IllegalArgumentException("User not found");
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListServiceAccounts.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListServiceAccounts.java
new file mode 100644
index 000000000..93bef7e34
--- /dev/null
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListServiceAccounts.java
@@ -0,0 +1,32 @@
+package org.platformlayer.keystone.cli.commands;
+
+import java.util.List;
+
+import org.kohsuke.args4j.Option;
+import org.platformlayer.RepositoryException;
+import org.platformlayer.auth.ServiceAccountEntity;
+import org.platformlayer.auth.UserDatabase;
+
+import com.fathomdb.utils.Hex;
+
+public class ListServiceAccounts extends KeystoneCommandRunnerBase {
+ @Option(name = "-k", aliases = "--key", usage = "Public key")
+ public String publicKey;
+
+ public ListServiceAccounts() {
+ super("list", "serviceaccounts");
+ }
+
+ @Override
+ public Object runCommand() throws RepositoryException {
+ UserDatabase userRepository = getContext().getUserRepository();
+
+ byte[] publicKeyBytes = null;
+ if (publicKey != null) {
+ publicKeyBytes = Hex.fromHex(publicKey);
+ }
+ List serviceAcccounts = userRepository.listAllServiceAccounts(publicKeyBytes);
+ return serviceAcccounts;
+ }
+
+}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListUsers.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListUsers.java
index c7531dd0d..d3e28ba4e 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListUsers.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/commands/ListUsers.java
@@ -4,7 +4,7 @@
import org.kohsuke.args4j.Argument;
import org.platformlayer.RepositoryException;
-import org.platformlayer.auth.UserRepository;
+import org.platformlayer.auth.UserDatabase;
public class ListUsers extends KeystoneCommandRunnerBase {
@Argument(index = 0)
@@ -16,7 +16,7 @@ public ListUsers() {
@Override
public Object runCommand() throws RepositoryException {
- UserRepository userRepository = getContext().getUserRepository();
+ UserDatabase userRepository = getContext().getUserRepository();
List users = userRepository.listAllUserNames(prefix);
return users;
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/KeystoneFormatterRegistry.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/KeystoneFormatterRegistry.java
index 7fb9b4ee6..9f58fd036 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/KeystoneFormatterRegistry.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/KeystoneFormatterRegistry.java
@@ -6,7 +6,7 @@ public class KeystoneFormatterRegistry extends FormatterRegistryBase {
public KeystoneFormatterRegistry() {
addDefaultFormatters();
- discoverFormatters(getClass().getPackage());
+ discoverFormatters();
}
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsProjectFormatter.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsProjectFormatter.java
index 51cbce1d5..b731a9da9 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsProjectFormatter.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsProjectFormatter.java
@@ -3,23 +3,24 @@
import java.io.IOException;
import java.util.LinkedHashMap;
-import org.platformlayer.auth.OpsProject;
+import org.platformlayer.auth.ProjectInfo;
+import com.fathomdb.cli.CliContext;
import com.fathomdb.cli.formatter.SimpleFormatter;
import com.fathomdb.cli.output.OutputSink;
import com.google.common.collect.Maps;
-public class OpsProjectFormatter extends SimpleFormatter {
+public class OpsProjectFormatter extends SimpleFormatter {
public OpsProjectFormatter() {
- super(OpsProject.class);
+ super(ProjectInfo.class);
}
@Override
- public void visit(OpsProject o, OutputSink sink) throws IOException {
+ public void visit(CliContext context, ProjectInfo o, OutputSink sink) throws IOException {
LinkedHashMap values = Maps.newLinkedHashMap();
- values.put("key", o.key);
+ values.put("name", o.getName());
sink.outputRow(values);
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsUserFormatter.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsUserFormatter.java
index 427e754f3..ab983e884 100644
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsUserFormatter.java
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/OpsUserFormatter.java
@@ -5,6 +5,7 @@
import org.platformlayer.auth.OpsUser;
+import com.fathomdb.cli.CliContext;
import com.fathomdb.cli.formatter.SimpleFormatter;
import com.fathomdb.cli.output.OutputSink;
import com.google.common.collect.Maps;
@@ -16,11 +17,11 @@ public OpsUserFormatter() {
}
@Override
- public void visit(OpsUser o, OutputSink sink) throws IOException {
+ public void visit(CliContext context, OpsUser o, OutputSink sink) throws IOException {
LinkedHashMap values = Maps.newLinkedHashMap();
- values.put("id", o.id);
- values.put("key", o.key);
+ // values.put("id", o.id);
+ values.put("user", o.toString());
sink.outputRow(values);
}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/ServiceAccountFormatter.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/ServiceAccountFormatter.java
new file mode 100644
index 000000000..59bfc885b
--- /dev/null
+++ b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/formatters/ServiceAccountFormatter.java
@@ -0,0 +1,32 @@
+package org.platformlayer.keystone.cli.formatters;
+
+import java.io.IOException;
+import java.util.LinkedHashMap;
+
+import org.platformlayer.auth.ServiceAccount;
+import org.platformlayer.auth.ServiceAccountEntity;
+
+import com.fathomdb.cli.CliContext;
+import com.fathomdb.cli.formatter.SimpleFormatter;
+import com.fathomdb.cli.output.OutputSink;
+import com.fathomdb.utils.Hex;
+import com.google.common.collect.Maps;
+
+public class ServiceAccountFormatter extends SimpleFormatter {
+
+ public ServiceAccountFormatter() {
+ super(ServiceAccount.class);
+ }
+
+ @Override
+ public void visit(CliContext context, ServiceAccount o, OutputSink sink) throws IOException {
+ LinkedHashMap values = Maps.newLinkedHashMap();
+
+ ServiceAccountEntity entity = (ServiceAccountEntity) o;
+
+ values.put("subject", entity.subject);
+ values.put("publicKeyData", Hex.toHex(entity.publicKeyData));
+
+ sink.outputRow(values);
+ }
+}
diff --git a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/guice/CliModule.java b/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/guice/CliModule.java
deleted file mode 100644
index a971d1415..000000000
--- a/auth/keystone-cli/src/main/java/org/platformlayer/keystone/cli/guice/CliModule.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.platformlayer.keystone.cli.guice;
-
-import java.util.Properties;
-
-import org.platformlayer.keystone.cli.KeystoneCliOptions;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Module;
-import com.google.inject.name.Names;
-
-public class CliModule extends AbstractModule {
-
- private final KeystoneCliOptions options;
-
- public CliModule(KeystoneCliOptions options) {
- this.options = options;
- }
-
- @Override
- protected void configure() {
- Properties config = options.getConfigurationProperties();
- Names.bindProperties(binder(), config);
-
- bindAuthenticationModules(config);
- }
-
- private void bindAuthenticationModules(Properties config) {
- String userProvider = config.getProperty("auth.user.module");
- if (userProvider != null) {
- installModule(userProvider);
- }
- String systemProvider = config.getProperty("auth.system.module");
- if (systemProvider != null) {
- if (!systemProvider.equals(userProvider)) {
- installModule(systemProvider);
- }
- }
- }
-
- private void installModule(String moduleClassName) {
- try {
- Class> moduleClass = Class.forName(moduleClassName);
- Module module = (Module) moduleClass.newInstance();
- binder().install(module);
- } catch (Exception e) {
- throw new IllegalStateException("Error loading class: " + moduleClassName);
- }
- }
-
-}
diff --git a/auth/pom.xml b/auth/pom.xml
index 77d2bdb13..3f40174f5 100644
--- a/auth/pom.xml
+++ b/auth/pom.xml
@@ -8,21 +8,11 @@
1.0-SNAPSHOT
- 1.0-SNAPSHOT
- org.platformlayer
keystone-parent
PlatformLayer :: Auth :: Parent
pom
-
- 4.8.2
- 7.4.1.v20110513
- 1.10
- 3.0
-
-
- keystone-api
keystone-cli
server-shared
server-admin
@@ -32,13 +22,6 @@
-
-
- org.slf4j
- slf4j-log4j12
- 1.6.1
-
-
junit
junit
@@ -46,8 +29,6 @@
test
-
-
diff --git a/auth/server-admin/AuthAdminServer.launch b/auth/server-admin/AuthAdminServer.launch
deleted file mode 100644
index bcfe399d3..000000000
--- a/auth/server-admin/AuthAdminServer.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/auth/server-admin/logback.xml b/auth/server-admin/logback.xml
new file mode 100644
index 000000000..c9dae7427
--- /dev/null
+++ b/auth/server-admin/logback.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ %d [%thread] %-5level %logger{35} - %msg %n
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/auth/server-admin/pom.xml b/auth/server-admin/pom.xml
index a4b93d147..318ec7357 100644
--- a/auth/server-admin/pom.xml
+++ b/auth/server-admin/pom.xml
@@ -9,16 +9,61 @@
keystone-webapp-admin
- Keystone :: Server :: Admin
+
+ postgresql
+ postgresql
+
+
org.platformlayer
keystone-webapp-shared
${version.project}
-
+
+ ch.qos.logback
+ logback-classic
+
+
+
+ org.platformlayer
+ metrics-client
+
+
+
+ com.yammer.metrics
+ metrics-jetty
+
+
+
+ org.apache.tomcat
+ tomcat-jdbc
+
+
+
+
+
+ maven-assembly-plugin
+ 2.3
+
+
+ src/main/assembly/tarfile.xml
+
+
+
+
+ make-assembly
+ package
+
+ single
+
+
+
+
+
+
diff --git a/auth/server-admin/src/main/assembly/tarfile.xml b/auth/server-admin/src/main/assembly/tarfile.xml
new file mode 100644
index 000000000..4d09f8b85
--- /dev/null
+++ b/auth/server-admin/src/main/assembly/tarfile.xml
@@ -0,0 +1,21 @@
+
+ bin
+
+ tar.gz
+
+
+ false
+
+
+
+
+ /
+ true
+ false
+ runtime
+
+
+
\ No newline at end of file
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/KeychainResource.java b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/KeychainResource.java
new file mode 100644
index 000000000..095565e0d
--- /dev/null
+++ b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/KeychainResource.java
@@ -0,0 +1,96 @@
+package org.openstack.keystone.resources.admin;
+
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+
+import org.platformlayer.auth.AuthenticatorException;
+import org.platformlayer.auth.ProjectEntity;
+import org.platformlayer.auth.UserEntity;
+import org.platformlayer.auth.UserProjectEntity;
+import org.platformlayer.auth.model.CertificateChainInfo;
+import org.platformlayer.auth.model.ValidateAccess;
+import org.platformlayer.auth.model.ValidateTokenResponse;
+import org.platformlayer.auth.resources.Mapping;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Path("v2.0/keychain")
+public class KeychainResource extends RootResource {
+ private static final Logger log = LoggerFactory.getLogger(KeychainResource.class);
+
+ @POST
+ public ValidateTokenResponse authorizeCertificateChain(@QueryParam("project") String project,
+ CertificateChainInfo chain) {
+ try {
+ requireSystemAccess();
+ } catch (AuthenticatorException e) {
+ log.warn("Error while checking system token", e);
+ throwInternalError();
+ }
+
+ UserEntity userEntity = null;
+ try {
+ boolean unlock = false;
+ userEntity = userAuthenticator.findUserFromKeychain(chain, unlock);
+ } catch (AuthenticatorException e) {
+ log.warn("Error while fetching user", e);
+ throwInternalError();
+ }
+
+ if (userEntity == null) {
+ throw404NotFound();
+ }
+
+ ValidateTokenResponse response = new ValidateTokenResponse();
+ response.access = new ValidateAccess();
+ response.access.user = Mapping.mapToUserValidation(userEntity);
+
+ // response.access.token = new Token();
+ // response.access.token.expires = checkTokenInfo.expiration;
+ // response.access.token.id = checkToken;
+
+ String checkProject = project;
+
+ if (checkProject != null) {
+ ProjectEntity projectEntity = null;
+
+ try {
+ projectEntity = userAuthenticator.findProject(checkProject);
+ } catch (AuthenticatorException e) {
+ log.warn("Error while fetching project", e);
+ throwInternalError();
+ }
+
+ if (projectEntity == null) {
+ throw404NotFound();
+ }
+
+ // Note that we do not unlock the user / project; we don't have any secret material
+ // TODO: We could return stuff encrypted with the user's public key
+ // projectEntity.unlockWithUser(userEntity);
+ //
+ // if (!projectEntity.isSecretValid()) {
+ // throw404NotFound();
+ // }
+
+ UserProjectEntity userProject = null;
+ try {
+ userProject = userAuthenticator.findUserProject(userEntity, projectEntity);
+ } catch (AuthenticatorException e) {
+ log.warn("Error while fetching project", e);
+ throwInternalError();
+ }
+
+ if (userProject == null) {
+ // Not a member of project
+ throw404NotFound();
+ }
+
+ response.access.project = Mapping.mapToProject(projectEntity);
+ response.access.project.roles = Mapping.mapToRoles(userProject.getRoles());
+ }
+
+ return response;
+ }
+}
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/PkiResource.java b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/PkiResource.java
new file mode 100644
index 000000000..94346febf
--- /dev/null
+++ b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/PkiResource.java
@@ -0,0 +1,123 @@
+package org.openstack.keystone.resources.admin;
+
+import java.security.cert.X509Certificate;
+import java.util.List;
+
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+import org.platformlayer.auth.AuthenticatorException;
+import org.platformlayer.auth.ProjectEntity;
+import org.platformlayer.auth.model.SignCertificateRequest;
+import org.platformlayer.auth.model.SignCertificateResponse;
+import org.platformlayer.auth.services.PkiService;
+import org.platformlayer.crypto.CertificateUtils;
+import org.platformlayer.ops.OpsException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fathomdb.crypto.FathomdbCrypto;
+import com.google.common.collect.Lists;
+
+@Path("/pki")
+public class PkiResource extends RootResource {
+ private static final Logger log = LoggerFactory.getLogger(PkiResource.class);
+
+ @Inject
+ PkiService pki;
+
+ @POST
+ @Path("csr")
+ public SignCertificateResponse signCertificate(SignCertificateRequest request) {
+ try {
+ requireSystemAccess();
+ } catch (AuthenticatorException e) {
+ log.warn("Error while checking system token", e);
+ throwInternalError();
+ }
+
+ // TokenInfo checkTokenInfo = tokenService.decodeToken(checkToken);
+ // if (checkTokenInfo == null || checkTokenInfo.hasExpired()) {
+ // throw404NotFound();
+ // }
+ //
+ // UserEntity user = null;
+ // try {
+ // user = userAuthenticator.getUserFromToken(checkTokenInfo.userId, checkTokenInfo.tokenSecret);
+ // } catch (AuthenticatorException e) {
+ // log.warn("Error while fetching user", e);
+ // throwInternalError();
+ // }
+ //
+ // if (user == null) {
+ // throw404NotFound();
+ // }
+
+ String projectKey = request.project;
+
+ ProjectEntity project = null;
+
+ try {
+ project = userAuthenticator.findProject(projectKey);
+ } catch (AuthenticatorException e) {
+ log.warn("Error while fetching project", e);
+ throwInternalError();
+ }
+
+ if (project == null) {
+ throw404NotFound();
+ }
+
+ project.setProjectSecret(FathomdbCrypto.deserializeKey(request.projectSecret));
+
+ // Note that we do not unlock the user / project; we don't have any secret material
+ // TODO: We could return stuff encrypted with the user's public key
+ // projectEntity.unlockWithUser(userEntity);
+ //
+ // if (!projectEntity.isSecretValid()) {
+ // throw404NotFound();
+ // }
+
+ // UserProjectEntity userProject = null;
+ // try {
+ // userProject = userAuthenticator.findUserProject(user, project);
+ // } catch (AuthenticatorException e) {
+ // log.warn("Error while fetching project", e);
+ // throwInternalError();
+ // }
+ //
+ // if (userProject == null) {
+ // // Not a member of project
+ // throw404NotFound();
+ // }
+ //
+ // boolean isOwner = false;
+ // for (RoleId role : userProject.getRoles()) {
+ // if (role.equals(RoleId.OWNER)) {
+ // isOwner = true;
+ // }
+ // }
+ //
+ // if (!isOwner) {
+ // throwUnauthorized();
+ // }
+
+ List certificates = null;
+ try {
+ certificates = pki.signCsr(project, request.csr);
+ } catch (OpsException e) {
+ log.warn("Error while signing CSR", e);
+ throwInternalError();
+ }
+
+ SignCertificateResponse response = new SignCertificateResponse();
+
+ response.certificates = Lists.newArrayList();
+ for (X509Certificate cert : certificates) {
+ response.certificates.add(CertificateUtils.toPem(cert));
+ }
+ return response;
+ }
+
+}
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/RootResource.java b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/RootResource.java
new file mode 100644
index 000000000..4cabac2bf
--- /dev/null
+++ b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/RootResource.java
@@ -0,0 +1,61 @@
+package org.openstack.keystone.resources.admin;
+
+import java.security.cert.X509Certificate;
+
+import javax.inject.Inject;
+
+import org.platformlayer.auth.AuthenticatorException;
+import org.platformlayer.auth.ServiceAccount;
+import org.platformlayer.auth.model.CertificateChainInfo;
+import org.platformlayer.auth.model.CertificateInfo;
+import org.platformlayer.auth.resources.PlatformlayerAuthResourceBase;
+import org.platformlayer.auth.services.SystemAuthenticator;
+import org.platformlayer.auth.services.TokenService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fathomdb.crypto.Certificates;
+import com.fathomdb.utils.Hex;
+
+public class RootResource extends PlatformlayerAuthResourceBase {
+ private static final Logger log = LoggerFactory.getLogger(RootResource.class);
+
+ @Inject
+ protected SystemAuthenticator systemAuthenticator;
+
+ @Inject
+ protected TokenService tokenService;
+
+ protected void requireSystemAccess() throws AuthenticatorException {
+ X509Certificate[] certChain = getCertificateChain();
+ if (certChain != null && certChain.length != 0) {
+ CertificateChainInfo chain = new CertificateChainInfo();
+ for (X509Certificate cert : certChain) {
+ CertificateInfo info = new CertificateInfo();
+
+ info.publicKey = Hex.toHex(cert.getPublicKey().getEncoded());
+ info.subjectDN = Certificates.getSubject(cert);
+
+ // Md5Hash hash = OpenSshUtils.getSignature(cert.getPublicKey());
+ // certificateInfo.setPublicKeyHash(hash.toHex());
+
+ chain.certificates.add(info);
+ }
+
+ ServiceAccount auth = systemAuthenticator.authenticate(chain);
+ if (auth != null) {
+ log.debug("Certificate authentication SUCCESS for " + chain);
+ return;
+ }
+
+ log.debug("Certificate authentication FAIL for " + chain);
+ } else {
+ log.debug("Certificate authentication FAIL (no certificate presented)");
+ }
+
+ throwUnauthorized();
+
+ // return myTokenInfo;
+ }
+
+}
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/ServicesResource.java b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/ServicesResource.java
new file mode 100644
index 000000000..81cbd2596
--- /dev/null
+++ b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/ServicesResource.java
@@ -0,0 +1,42 @@
+package org.openstack.keystone.resources.admin;
+
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+import org.platformlayer.auth.AuthenticatorException;
+import org.platformlayer.auth.ServiceAccountEntity;
+import org.platformlayer.auth.model.CheckServiceAccessRequest;
+import org.platformlayer.auth.model.CheckServiceAccessResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Path("/services")
+public class ServicesResource extends RootResource {
+ private static final Logger log = LoggerFactory.getLogger(ServicesResource.class);
+
+ @POST
+ @Path("check")
+ public CheckServiceAccessResponse checkServiceAccess(CheckServiceAccessRequest request) {
+ try {
+ requireSystemAccess();
+ } catch (AuthenticatorException e) {
+ log.warn("Error while checking system token", e);
+ throwInternalError();
+ }
+
+ ServiceAccountEntity serviceAccount = null;
+ try {
+ serviceAccount = systemAuthenticator.authenticate(request.chain);
+ } catch (AuthenticatorException e) {
+ log.warn("Error while authenticating chain", e);
+ throwInternalError();
+ }
+
+ CheckServiceAccessResponse response = new CheckServiceAccessResponse();
+ if (serviceAccount != null) {
+ response.serviceAccount = serviceAccount.subject;
+ }
+ return response;
+ }
+
+}
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/TenantsResource.java b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/TenantsResource.java
deleted file mode 100644
index 1565a7400..000000000
--- a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/TenantsResource.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.openstack.keystone.resources.admin;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-
-import org.openstack.keystone.model.Tenant;
-import org.openstack.keystone.model.TenantsList;
-import org.openstack.keystone.resources.KeystoneResourceBase;
-
-public class TenantsResource extends KeystoneResourceBase {
- @GET
- @Produces({ APPLICATION_XML, APPLICATION_JSON })
- public TenantsList listTenants(@QueryParam("name") String tenantName) {
- throw new UnsupportedOperationException();
- // TokenInfo myToken = requireAdminToken();
- //
- // if (tenantName != null) {
- // // SPECBUG: Calls should always return the same schema
- // throw new UnsupportedOperationException();
- // }
- //
- // TenantsList tenants = authentication.listTenants(myToken, null);
- // return tenants;
- }
-
- @GET
- @Path("{tenantId}/users/{userId}/roles")
- @Produces({ APPLICATION_XML, APPLICATION_JSON })
- public void getRoles(@PathParam("tenantId") String tenantId, @PathParam("userId") String userId) {
- throw new UnsupportedOperationException();
-
- // TokenInfo myToken = requireAdminToken();
- //
- // TenantsList tenants = authentication.listTenants(myToken, null);
- // return tenants;
- }
-
- @GET
- @Path("{tenantId}/endpoints")
- @Produces({ APPLICATION_XML, APPLICATION_JSON })
- public void getEndpoints(@HeaderParam("X-Auth-Token") String tokenId, @PathParam("tenantId") String tenantId) {
- throw new UnsupportedOperationException();
- }
-
- @GET
- @Path("{tenantId}")
- @Produces({ APPLICATION_XML, APPLICATION_JSON })
- public Tenant getTenant(@PathParam("tenantId") String tenantId) {
- throw new UnsupportedOperationException();
-
- // TokenInfo myToken = requireAdminToken();
- //
- // TenantsList tenants = authentication.listTenants(myToken, tenantId);
- // if (isNullOrEmpty(tenants.tenant)) {
- // throw404NotFound();
- // }
- // if (tenants.tenant.size() != 1) {
- // throw new IllegalStateException("Unexpected number of items found");
- // }
- // return tenants.tenant.get(0);
- }
-}
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/TokensResource.java b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/TokensResource.java
index 29c352146..72939f4ca 100644
--- a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/TokensResource.java
+++ b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/TokensResource.java
@@ -1,81 +1,98 @@
package org.openstack.keystone.resources.admin;
-import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
-import org.apache.log4j.Logger;
-import org.openstack.keystone.model.Access;
-import org.openstack.keystone.model.Auth;
-import org.openstack.keystone.model.UserValidation;
-import org.openstack.keystone.model.ValidateAccess;
-import org.openstack.keystone.model.ValidateTokenResponse;
-import org.openstack.keystone.resources.KeystoneResourceBase;
-import org.openstack.keystone.resources.Mapping;
-import org.openstack.keystone.services.AuthenticatorException;
-import org.openstack.keystone.services.TokenInfo;
-import org.openstack.keystone.services.UserInfo;
-
-import com.google.common.base.Objects;
+import org.platformlayer.auth.AuthenticatorException;
+import org.platformlayer.auth.ProjectEntity;
+import org.platformlayer.auth.UserEntity;
+import org.platformlayer.auth.UserProjectEntity;
+import org.platformlayer.auth.model.Token;
+import org.platformlayer.auth.model.ValidateAccess;
+import org.platformlayer.auth.model.ValidateTokenResponse;
+import org.platformlayer.auth.resources.Mapping;
+import org.platformlayer.auth.services.TokenInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@Path("v2.0/tokens")
-public class TokensResource extends KeystoneResourceBase {
- static final Logger log = Logger.getLogger(TokensResource.class);
-
- @POST
- @Produces({ APPLICATION_XML, APPLICATION_JSON })
- @Consumes({ APPLICATION_XML, APPLICATION_JSON })
- public Access authenticate(Auth request) {
- throw new UnsupportedOperationException();
-
- // boolean isSystem = true;
- // TokenInfo tokenInfo = doAuthenticate(isSystem, request);
- }
+public class TokensResource extends RootResource {
+ private static final Logger log = LoggerFactory.getLogger(TokensResource.class);
@GET
// @HEAD support is automatic from the @GET
@Path("{tokenId}")
- public ValidateTokenResponse validateToken(@HeaderParam("X-Auth-Token") String myToken,
- @PathParam("tokenId") String checkToken, @QueryParam("belongsTo") String tenantId) {
- requireSystemToken();
-
- TokenInfo checkTokenInfo = authentication.validateToken(false, checkToken);
- if (checkTokenInfo == null) {
- throw404NotFound();
+ public ValidateTokenResponse validateToken(@PathParam("tokenId") String checkToken,
+ @QueryParam("project") String project) {
+ try {
+ requireSystemAccess();
+ } catch (AuthenticatorException e) {
+ log.warn("Error while checking system token", e);
+ throwInternalError();
}
- if (tenantId != null) {
- if (!Objects.equal(tenantId, checkTokenInfo.scope)) {
- throw404NotFound();
- }
+ TokenInfo checkTokenInfo = tokenService.decodeToken(checkToken);
+ if (checkTokenInfo == null || checkTokenInfo.hasExpired()) {
+ throw404NotFound();
}
- UserInfo userInfo = null;
+ UserEntity userEntity = null;
try {
- userInfo = authentication.getUserInfo(checkTokenInfo.isSystem(), checkTokenInfo.userId,
- checkTokenInfo.tokenSecret);
+ userEntity = userAuthenticator.getUserFromToken(checkTokenInfo.userId, checkTokenInfo.tokenSecret);
} catch (AuthenticatorException e) {
- log.warn("Error while listing groups", e);
+ log.warn("Error while fetching user", e);
throwInternalError();
}
ValidateTokenResponse response = new ValidateTokenResponse();
response.access = new ValidateAccess();
- response.access.user = new UserValidation();
- response.access.user.id = userInfo.userId;
- response.access.user.name = userInfo.username;
- response.access.user.roles = authentication.getRoles(userInfo, checkTokenInfo.scope);
+ response.access.user = Mapping.mapToUserValidation(userEntity);
- response.access.user.secret = userInfo.secret;
-
- response.access.token = Mapping.mapToResponse(checkTokenInfo);
+ response.access.token = new Token();
+ response.access.token.expires = checkTokenInfo.expiration;
response.access.token.id = checkToken;
+ String checkProject = project;
+
+ if (checkProject != null) {
+ ProjectEntity projectEntity = null;
+
+ try {
+ projectEntity = userAuthenticator.findProject(checkProject);
+ } catch (AuthenticatorException e) {
+ log.warn("Error while fetching project", e);
+ throwInternalError();
+ }
+
+ if (projectEntity == null) {
+ throw404NotFound();
+ }
+
+ projectEntity.unlockWithUser(userEntity);
+
+ if (!projectEntity.isSecretValid()) {
+ throw404NotFound();
+ }
+
+ UserProjectEntity userProject = null;
+ try {
+ userProject = userAuthenticator.findUserProject(userEntity, projectEntity);
+ } catch (AuthenticatorException e) {
+ log.warn("Error while fetching project", e);
+ throwInternalError();
+ }
+
+ if (userProject == null) {
+ // Not a member of project
+ throw404NotFound();
+ }
+
+ response.access.project = Mapping.mapToProject(projectEntity);
+ response.access.project.roles = Mapping.mapToRoles(userProject.getRoles());
+ }
+
return response;
}
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/UsersResource.java b/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/UsersResource.java
deleted file mode 100644
index 4017f906d..000000000
--- a/auth/server-admin/src/main/java/org/openstack/keystone/resources/admin/UsersResource.java
+++ /dev/null
@@ -1,95 +0,0 @@
-//package org.openstack.keystone.resources.admin;
-//
-//import javax.ws.rs.GET;
-//import javax.ws.rs.Path;
-//import javax.ws.rs.Produces;
-//import javax.ws.rs.QueryParam;
-//
-//import org.apache.log4j.Logger;
-//import org.openstack.keystone.model.User;
-//import org.openstack.keystone.resources.KeystoneResourceBase;
-//import org.openstack.keystone.resources.Mapping;
-//import org.openstack.keystone.services.AuthenticatorException;
-//import org.openstack.keystone.services.UserInfo;
-//
-//@Path("users")
-//public class UsersResource extends KeystoneResourceBase {
-// static final Logger log = Logger.getLogger(UsersResource.class);
-//
-// @GET
-// @Path("{userId}/roles")
-// @Produces({ APPLICATION_XML, APPLICATION_JSON })
-// public RoleList getUserRoles(@PathParam("userId") String userId) {
-// requireSystemToken();
-//
-// boolean isSystemUser = false;
-// UserInfo userInfo = null;
-// try {
-// userInfo = authentication.getUserInfo(isSystemUser, userId);
-// } catch (AuthenticatorException e) {
-// // An exception indicates something went wrong (i.e. not just bad credentials)
-// log.warn("Error while getting user info", e);
-// throwInternalError();
-// }
-//
-// if (userInfo == null) {
-// throw404NotFound();
-// }
-//
-// List roles = authentication.getRoles(userInfo, null);
-// List globalRoles = Lists.newArrayList();
-// for (Role role : roles) {
-// if (role.tenantId != null)
-// continue;
-// globalRoles.add(role);
-// }
-// return Mapping.mapToRoles(globalRoles);
-// }
-//
-// @GET
-// @Path("{userId}")
-// @Produces({ APPLICATION_XML, APPLICATION_JSON })
-// public User getUserById(@PathParam("userId") String userId) {
-// requireSystemToken();
-//
-// boolean isSystemUser = false;
-//
-// UserInfo userInfo = null;
-// try {
-// userInfo = authentication.getUserInfo(isSystemUser, userId);
-// } catch (AuthenticatorException e) {
-// // An exception indicates something went wrong (i.e. not just bad credentials)
-// log.warn("Error while getting user info", e);
-// throwInternalError();
-// }
-// if (userInfo == null) {
-// throw404NotFound();
-// }
-//
-// return Mapping.mapToUser(userInfo);
-// }
-//
-// @GET
-// @Produces({ APPLICATION_XML, APPLICATION_JSON })
-// public User getUserByUsername(@QueryParam("username") String username) {
-// requireSystemToken();
-//
-// boolean isSystemUser = false;
-//
-// UserInfo userInfo = null;
-// try {
-// userInfo = authentication.getUserInfoByUsername(isSystemUser, username);
-// } catch (AuthenticatorException e) {
-// // An exception indicates something went wrong (i.e. not just bad credentials)
-// log.warn("Error while getting user info", e);
-// throwInternalError();
-// }
-//
-// if (userInfo == null) {
-// throw404NotFound();
-// }
-//
-// return Mapping.mapToUser(userInfo);
-// }
-//
-// }
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/server/AdminServerConfig.java b/auth/server-admin/src/main/java/org/openstack/keystone/server/AdminServerConfig.java
deleted file mode 100644
index bb4332b7d..000000000
--- a/auth/server-admin/src/main/java/org/openstack/keystone/server/AdminServerConfig.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.openstack.keystone.server;
-
-import java.util.Map;
-
-import org.openstack.keystone.resources.admin.TokensResource;
-
-import com.google.common.collect.Maps;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.servlet.GuiceServletContextListener;
-import com.sun.jersey.api.core.PackagesResourceConfig;
-import com.sun.jersey.guice.JerseyServletModule;
-import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
-
-public class AdminServerConfig extends GuiceServletContextListener {
-
- @Override
- protected Injector getInjector() {
- return Guice.createInjector(new GuiceAuthenticationConfig(), new JerseyServletModule() {
- @Override
- protected void configureServlets() {
-
- boolean isAdmin = false;
- if (isAdmin) {
- throw new UnsupportedOperationException();
- } else {
- bind(TokensResource.class);
-
- Map params = Maps.newHashMap();
- params.put(PackagesResourceConfig.PROPERTY_PACKAGES,
- "org.openstack.keystone.jaxrs;org.codehaus.jackson.jaxrs");
- serve("/*").with(GuiceContainer.class, params);
- }
- }
- });
- }
-}
diff --git a/auth/server-admin/src/main/java/org/openstack/keystone/server/KeystoneAdminServer.java b/auth/server-admin/src/main/java/org/openstack/keystone/server/KeystoneAdminServer.java
index eb92fe581..74073470a 100644
--- a/auth/server-admin/src/main/java/org/openstack/keystone/server/KeystoneAdminServer.java
+++ b/auth/server-admin/src/main/java/org/openstack/keystone/server/KeystoneAdminServer.java
@@ -1,48 +1,91 @@
package org.openstack.keystone.server;
import java.util.EnumSet;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.Inject;
-import org.eclipse.jetty.server.DispatcherType;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.servlet.DefaultServlet;
-import org.eclipse.jetty.servlet.FilterHolder;
-import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.openstack.keystone.resources.admin.KeychainResource;
+import org.openstack.keystone.resources.admin.PkiResource;
+import org.openstack.keystone.resources.admin.ServicesResource;
+import org.openstack.keystone.resources.admin.TokensResource;
import org.platformlayer.WellKnownPorts;
+import org.platformlayer.auth.KeystoneJdbcModule;
+import org.platformlayer.auth.keystone.KeystoneOpsSystemModule;
+import org.platformlayer.auth.server.GuiceAuthenticationConfig;
+import org.platformlayer.cache.CacheModule;
+import org.platformlayer.config.ConfigurationModule;
+import org.platformlayer.metrics.MetricReporter;
+import org.platformlayer.metrics.client.codahale.CodahaleMetricsModule;
-import com.google.inject.servlet.GuiceFilter;
+import com.fathomdb.server.http.SslOption;
+import com.fathomdb.server.http.WebServerBuilder;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.sun.jersey.api.core.PackagesResourceConfig;
+import com.sun.jersey.guice.JerseyServletModule;
+import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
public class KeystoneAdminServer {
- private Server server;
+ private Server jettyServer;
+
+ @Inject
+ WebServerBuilder serverBuilder;
+
+ @Inject
+ Injector injector;
+
+ @Inject
+ MetricReporter metricReporter;
public static void main(String[] args) throws Exception {
- KeystoneAdminServer server = new KeystoneAdminServer();
- server.start(WellKnownPorts.PORT_PLATFORMLAYER_AUTH_ADMIN);
- }
+ List modules = Lists.newArrayList();
+ modules.add(new ConfigurationModule());
+ modules.add(new CacheModule());
+ modules.add(new GuiceAuthenticationConfig());
+ modules.add(new KeystoneJdbcModule());
+ modules.add(new KeystoneOpsSystemModule());
+ modules.add(new CodahaleMetricsModule());
+ modules.add(new JerseyServletModule() {
+ @Override
+ protected void configureServlets() {
+ bind(TokensResource.class);
+ bind(KeychainResource.class);
+ bind(PkiResource.class);
+ bind(ServicesResource.class);
- public void start(int port) throws Exception {
- this.server = new Server(port);
+ Map params = Maps.newHashMap();
+ params.put(PackagesResourceConfig.PROPERTY_PACKAGES,
+ "org.openstack.keystone.jaxrs;org.codehaus.jackson.jaxrs");
+ serve("/*").with(GuiceContainer.class, params);
+ }
+ });
- ServletContextHandler context = new ServletContextHandler();
- context.setContextPath("/");
- server.setHandler(context);
+ Injector injector = Guice.createInjector(modules);
- context.addEventListener(new AdminServerConfig());
+ KeystoneAdminServer server = injector.getInstance(KeystoneAdminServer.class);
+ server.start(WellKnownPorts.PORT_PLATFORMLAYER_AUTH_ADMIN);
+ }
- // Must add DefaultServlet for embedded Jetty
- // Failing to do this will cause 404 errors.
- context.addServlet(DefaultServlet.class, "/");
+ public void start(int port) throws Exception {
+ EnumSet options = EnumSet.of(SslOption.AllowAnyClientCertificate, SslOption.WantClientCertificate);
- FilterHolder filterHolder = new FilterHolder(GuiceFilter.class);
- context.addFilter(filterHolder, "*", EnumSet.of(DispatcherType.REQUEST));
+ serverBuilder.addHttpsConnector(port, options);
+ serverBuilder.addGuiceContext("/", injector);
- context.setClassLoader(Thread.currentThread().getContextClassLoader());
+ this.jettyServer = serverBuilder.start();
- server.start();
+ metricReporter.start();
}
public void stop() throws Exception {
- if (server != null) {
- server.stop();
+ if (jettyServer != null) {
+ jettyServer.stop();
}
}
}
diff --git a/auth/server-admin/src/main/java/org/platformlayer/auth/FakeAuthServlet.java b/auth/server-admin/src/main/java/org/platformlayer/auth/FakeAuthServlet.java
deleted file mode 100644
index 8be0bad81..000000000
--- a/auth/server-admin/src/main/java/org/platformlayer/auth/FakeAuthServlet.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.platformlayer.auth;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class FakeAuthServlet extends HttpServlet {
- private static final long serialVersionUID = -8270345309937119194L;
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
- // GET /v1.0 HTTP/1.1
- // Host: auth.api.rackspacecloud.com
- // X-Auth-User: jdoe
- // X-Auth-Key: a86850deb2742ec3cb41518e26aa2d89
-
- String user = req.getHeader("X-Auth-User");
- String secret = req.getHeader("X-Auth-Key");
-
- if (user != null && user.startsWith("USER-")) {
- int userId = Integer.parseInt(user.substring(5));
- String correctSecret = "SECRET-" + userId;
- if (correctSecret.equals(secret)) {
- sendCorrectAuth(userId, resp);
- return;
- }
- }
-
- // Return 401 unauthorized
- resp.setStatus(401);
- }
-
- void sendCorrectAuth(int userId, HttpServletResponse response) {
- /*
- * If authentication is successful, an HTTP status 204 No Content is returned with three cloud service headers,
- * X-Server-Management-Url, X-Storage-Url, X-CDN-Management-Url, as well as X-Auth-Token
- */
-
- String xaasUrl = "http://127.0.0.1:8082/" + userId;
-
- String authToken = "DEV-TOKEN-" + userId;
- response.setHeader("X-Auth-Token", authToken);
-
- response.setHeader("X-Server-Management-Url", "");
- response.setHeader("X-Storage-Url", "");
- response.setHeader("X-CDN-Management-Url", "");
- response.setHeader("X-PlatformLayer-Url", xaasUrl);
-
- response.setStatus(204);
- }
-}
diff --git a/auth/server-admin/src/main/java/org/platformlayer/auth/StandaloneAuthServer.java b/auth/server-admin/src/main/java/org/platformlayer/auth/StandaloneAuthServer.java
deleted file mode 100644
index 2504bb31b..000000000
--- a/auth/server-admin/src/main/java/org/platformlayer/auth/StandaloneAuthServer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.platformlayer.auth;
-
-import java.io.File;
-
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.ContextHandlerCollection;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-public class StandaloneAuthServer {
- static final int PORT = 8081;
-
- private Server server;
-
- public static void main(String[] args) throws Exception {
- System.setProperty("application.mode", "development");
-
- StandaloneAuthServer server = new StandaloneAuthServer();
- server.start();
-
- // try {
- // while (true) {
- // Thread.sleep(5000);
- // }
- // } finally {
- // server.stop();
- // }
- }
-
- public void start() throws Exception {
- this.server = new Server(PORT);
- ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection();
-
- WebAppContext root = new WebAppContext();
-
- File base = new File(".").getCanonicalFile();
- root.setWar(new File(base, "src/main/webapp").getCanonicalPath());
- root.setContextPath("/");
- contextHandlerCollection.addHandler(root);
-
- server.setHandler(contextHandlerCollection);
-
- server.start();
-
- }
-
- public void stop() throws Exception {
- if (server != null) {
- server.stop();
- }
- }
-
-}
diff --git a/auth/server-admin/src/main/resources/log4j.properties b/auth/server-admin/src/main/resources/log4j.properties
deleted file mode 100644
index 9e3571975..000000000
--- a/auth/server-admin/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-log4j.rootLogger=DEBUG, CONSOLE
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
-
-# Dial down logging on standard libraries
-log4j.logger.org.eclipse.jetty=INFO
diff --git a/auth/server-shared/pom.xml b/auth/server-shared/pom.xml
index edd0d8f2f..aeeea8eb2 100644
--- a/auth/server-shared/pom.xml
+++ b/auth/server-shared/pom.xml
@@ -13,33 +13,48 @@
+
- org.platformlayer
- keystone-api
- ${version.project}
+ com.fasterxml.jackson.jaxrs
+ jackson-jaxrs-json-provider
-
-
+
- org.codehaus.jackson
- jackson-xc
+ com.yammer.metrics
+ metrics-annotation
+
- org.codehaus.jackson
- jackson-jaxrs
+ com.yammer.metrics
+ metrics-jetty
-
+
+
+ com.yammer.metrics
+ metrics-core
+
+
+
+
+ org.bouncycastle
+ bcprov-jdk15on
+
+
+
+ org.bouncycastle
+ bcpkix-jdk15on
+
+
org.eclipse.jetty
jetty-webapp
- ${jetty.version}
org.eclipse.jetty
jetty-server
- ${jetty.version}
@@ -48,35 +63,46 @@
platformlayer-auth
-
- org.slf4j
- slf4j-log4j12
-
-
org.eclipse.jetty
jetty-servlet
- ${jetty.version}
+
com.google.inject
guice
- ${guice.verion}
com.sun.jersey
jersey-server
- ${jersey.version}
+
+
+ com.sun.jersey
+ jersey-json
com.sun.jersey.contribs
jersey-guice
- ${jersey.version}
+
+
+ com.fathomdb
+ fathomdb-ratelimit
+
+
+
+ com.fathomdb
+ fathomdb-server
+
+
+
+ com.fathomdb
+ fathomdb-jpa
+
+
junit
junit
- ${junit.version}
test
@@ -86,63 +112,15 @@
-
-
org.codehaus.mojo
jaxb2-maven-plugin
-
-
-
- generate-resources
-
- schemagen
-
-
-
+ 1.5
- ${project.build.directory}/schemas
- ${basedir}
- src/main/java/org/openstack/keystone/model/**/*.java
+ **/model/**/*.java
- true
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
- com.sun.tools.jxc.maven2
- maven-jaxb-schemagen-plugin
- [1.2,)
-
- generate
-
-
-
-
-
-
-
-
-
-
-
-