You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by cm...@apache.org on 2019/08/28 09:26:43 UTC

[incubator-milagro-dta] branch policy updated: Add Policy to protobuffer defs

This is an automated email from the ASF dual-hosted git repository.

cmorris pushed a commit to branch policy
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git


The following commit(s) were added to refs/heads/policy by this push:
     new c94d466  Add Policy to protobuffer defs
c94d466 is described below

commit c94d466fff139d4ebf1d716c539a4f3d755775b0
Author: Christopher Morris <ch...@morris.net>
AuthorDate: Wed Aug 28 10:25:36 2019 +0100

    Add Policy to protobuffer defs
---
 libs/documents/docValidation_test.go               | 111 -----
 libs/documents/docs.pb.go                          | 455 +++++++++++++++++----
 libs/documents/docs.proto                          |  39 +-
 libs/documents/docs.validator.pb.go                |  45 +-
 libs/documents/policy_test.go                      |  61 +++
 libs/documents/test-policy-documents/bad.json      |  56 +++
 libs/documents/test-policy-documents/manager.json  |  45 ++
 .../test-policy-documents/one_sg_two_of_three.json |  32 ++
 libs/documents/test-policy-documents/single.json   |  23 ++
 .../test-policy-documents/t_equals_p.json          |  31 ++
 .../test-policy-documents/three_groups.json        |  56 +++
 libs/documents/test-policy-documents/two_sg.json   |  55 +++
 12 files changed, 819 insertions(+), 190 deletions(-)

diff --git a/libs/documents/docValidation_test.go b/libs/documents/docValidation_test.go
deleted file mode 100644
index d1eca97..0000000
--- a/libs/documents/docValidation_test.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package documents
-
-import (
-	"fmt"
-	"testing"
-	"time"
-
-	"github.com/apache/incubator-milagro-dta/libs/cryptowallet"
-	multihash "github.com/multiformats/go-multihash"
-	"github.com/stretchr/testify/assert"
-)
-
-var (
-	pass = true
-	fail = false
-)
-
-func Test_1(t *testing.T) {
-	now := time.Now().Unix()
-
-	msg := &OrderDocument{
-		Coin:      10,
-		Reference: "ABC",
-		Timestamp: now,
-	}
-	err := msg.Validate()
-	assert.Nil(t, err, "Validation Failed")
-}
-
-func Test_SignedEnvelope(t *testing.T) {
-	se := &SignedEnvelope{
-		Signature: []byte("012345678901234567890123456789"),
-		SignerCID: "",
-		Message:   nil,
-	}
-	err := se.Validate()
-	assert.Nil(t, err, "Validation Failed1")
-
-}
-
-func Test_IPFSRegex(t *testing.T) {
-
-	rec := &Recipient{
-		Version: 1,
-		CID:     "QmSkKsExuUZJ9ETraPB9ZA9KySYGynvx1jK7LmWgRxinhx",
-	}
-	err := rec.Validate()
-	assert.Nil(t, err, "Validation Failed1")
-
-	rec = &Recipient{
-		Version: 1,
-		CID:     "QmSkKsExuUZJ9ETraPB9ZA9KySYGynvx1jK7LmWgRxinhx1", //extra char
-	}
-	err = rec.Validate()
-	assert.NotNil(t, err, "Validation Failed2")
-
-	rec = &Recipient{
-		Version: 1,
-		CID:     "QmSkKsExuUZJ9ETraPB9ZA9KySYGynvx1jK7LmWgRxinh", //less 1 char
-	}
-	err = rec.Validate()
-	assert.NotNil(t, err, "Validation Failed3")
-
-	rec = &Recipient{
-		Version: 1,
-		CID:     "QmSkKsExuUZJ9ETraPB9;A9KySYGynvx1jK7LmWgRxinhx", //puncuation
-	}
-	err = rec.Validate()
-	assert.NotNil(t, err, "Validation Failed4")
-
-	rec = &Recipient{
-		Version: 1,
-		CID:     "",
-	}
-	err = rec.Validate()
-	assert.Nil(t, err, "Validation Failed5")
-
-	rec = &Recipient{}
-	err = rec.Validate()
-	assert.Nil(t, err, "Validation Failed6")
-
-	for i := 0; i < 1000; i++ {
-		rnddata, _ := cryptowallet.RandomBytes(32)
-		mh, _ := multihash.Sum(rnddata, multihash.SHA2_256, 32)
-		cid := mh.B58String()
-		cid = fmt.Sprintf("%s", cid)
-		rec := &Recipient{
-			Version: 1,
-			CID:     cid,
-		}
-		err := rec.Validate()
-		assert.Nil(t, err, "Validation Failed1")
-	}
-}
diff --git a/libs/documents/docs.pb.go b/libs/documents/docs.pb.go
index bb74de9..51e50dd 100644
--- a/libs/documents/docs.pb.go
+++ b/libs/documents/docs.pb.go
@@ -395,6 +395,7 @@ type OrderDocument struct {
 	OrderPart2           *OrderPart2 `protobuf:"bytes,7,opt,name=OrderPart2,proto3" json:"OrderPart2,omitempty"`
 	OrderPart3           *OrderPart3 `protobuf:"bytes,8,opt,name=OrderPart3,proto3" json:"OrderPart3,omitempty"`
 	OrderPart4           *OrderPart4 `protobuf:"bytes,9,opt,name=OrderPart4,proto3" json:"OrderPart4,omitempty"`
+	Policy               *Policy     `protobuf:"bytes,10,opt,name=policy,proto3" json:"policy,omitempty"`
 	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
 	XXX_unrecognized     []byte      `json:"-"`
 	XXX_sizecache        int32       `json:"-"`
@@ -488,6 +489,13 @@ func (m *OrderDocument) GetOrderPart4() *OrderPart4 {
 	return nil
 }
 
+func (m *OrderDocument) GetPolicy() *Policy {
+	if m != nil {
+		return m.Policy
+	}
+	return nil
+}
+
 type OrderPart2 struct {
 	CommitmentPublicKey  string   `protobuf:"bytes,1,opt,name=CommitmentPublicKey,proto3" json:"CommitmentPublicKey,omitempty"`
 	PreviousOrderCID     string   `protobuf:"bytes,2,opt,name=PreviousOrderCID,proto3" json:"PreviousOrderCID,omitempty"`
@@ -661,19 +669,67 @@ func (m *OrderPart4) GetTimestamp() int64 {
 	return 0
 }
 
-type Policy struct {
-	Version              float32  `protobuf:"fixed32,1,opt,name=Version,proto3" json:"Version,omitempty"`
-	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
+type PolicyWrapper struct {
+	Policy               *Policy  `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
 }
 
+func (m *PolicyWrapper) Reset()         { *m = PolicyWrapper{} }
+func (m *PolicyWrapper) String() string { return proto.CompactTextString(m) }
+func (*PolicyWrapper) ProtoMessage()    {}
+func (*PolicyWrapper) Descriptor() ([]byte, []int) {
+	return fileDescriptor_2a25dace11219bce, []int{9}
+}
+
+func (m *PolicyWrapper) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PolicyWrapper.Unmarshal(m, b)
+}
+func (m *PolicyWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PolicyWrapper.Marshal(b, m, deterministic)
+}
+func (m *PolicyWrapper) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PolicyWrapper.Merge(m, src)
+}
+func (m *PolicyWrapper) XXX_Size() int {
+	return xxx_messageInfo_PolicyWrapper.Size(m)
+}
+func (m *PolicyWrapper) XXX_DiscardUnknown() {
+	xxx_messageInfo_PolicyWrapper.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PolicyWrapper proto.InternalMessageInfo
+
+func (m *PolicyWrapper) GetPolicy() *Policy {
+	if m != nil {
+		return m.Policy
+	}
+	return nil
+}
+
+type Policy struct {
+	Example              string          `protobuf:"bytes,2,opt,name=example,proto3" json:"example,omitempty"`
+	WalletRef            string          `protobuf:"bytes,3,opt,name=walletRef,proto3" json:"walletRef,omitempty"`
+	NodeId               string          `protobuf:"bytes,4,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
+	Coin                 int64           `protobuf:"varint,5,opt,name=coin,proto3" json:"coin,omitempty"`
+	SharingGroups        []*SharingGroup `protobuf:"bytes,6,rep,name=sharingGroups,proto3" json:"sharingGroups,omitempty"`
+	ParticipantCount     int64           `protobuf:"varint,7,opt,name=participantCount,proto3" json:"participantCount,omitempty"`
+	Threshold            int64           `protobuf:"varint,8,opt,name=threshold,proto3" json:"threshold,omitempty"`
+	Signers              []int64         `protobuf:"varint,9,rep,packed,name=signers,proto3" json:"signers,omitempty"`
+	PublicAddress        string          `protobuf:"bytes,10,opt,name=publicAddress,proto3" json:"publicAddress,omitempty"`
+	Beneficiarydocid     string          `protobuf:"bytes,11,opt,name=beneficiarydocid,proto3" json:"beneficiarydocid,omitempty"`
+	DateTime             int64           `protobuf:"varint,12,opt,name=dateTime,proto3" json:"dateTime,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
 func (m *Policy) Reset()         { *m = Policy{} }
 func (m *Policy) String() string { return proto.CompactTextString(m) }
 func (*Policy) ProtoMessage()    {}
 func (*Policy) Descriptor() ([]byte, []int) {
-	return fileDescriptor_2a25dace11219bce, []int{9}
+	return fileDescriptor_2a25dace11219bce, []int{10}
 }
 
 func (m *Policy) XXX_Unmarshal(b []byte) error {
@@ -694,20 +750,250 @@ func (m *Policy) XXX_DiscardUnknown() {
 
 var xxx_messageInfo_Policy proto.InternalMessageInfo
 
-func (m *Policy) GetVersion() float32 {
+func (m *Policy) GetExample() string {
 	if m != nil {
-		return m.Version
+		return m.Example
+	}
+	return ""
+}
+
+func (m *Policy) GetWalletRef() string {
+	if m != nil {
+		return m.WalletRef
+	}
+	return ""
+}
+
+func (m *Policy) GetNodeId() string {
+	if m != nil {
+		return m.NodeId
+	}
+	return ""
+}
+
+func (m *Policy) GetCoin() int64 {
+	if m != nil {
+		return m.Coin
+	}
+	return 0
+}
+
+func (m *Policy) GetSharingGroups() []*SharingGroup {
+	if m != nil {
+		return m.SharingGroups
+	}
+	return nil
+}
+
+func (m *Policy) GetParticipantCount() int64 {
+	if m != nil {
+		return m.ParticipantCount
+	}
+	return 0
+}
+
+func (m *Policy) GetThreshold() int64 {
+	if m != nil {
+		return m.Threshold
+	}
+	return 0
+}
+
+func (m *Policy) GetSigners() []int64 {
+	if m != nil {
+		return m.Signers
+	}
+	return nil
+}
+
+func (m *Policy) GetPublicAddress() string {
+	if m != nil {
+		return m.PublicAddress
+	}
+	return ""
+}
+
+func (m *Policy) GetBeneficiarydocid() string {
+	if m != nil {
+		return m.Beneficiarydocid
+	}
+	return ""
+}
+
+func (m *Policy) GetDateTime() int64 {
+	if m != nil {
+		return m.DateTime
+	}
+	return 0
+}
+
+type SharingGroup struct {
+	Groupid              int64       `protobuf:"varint,1,opt,name=groupid,proto3" json:"groupid,omitempty"`
+	Groupref             string      `protobuf:"bytes,2,opt,name=groupref,proto3" json:"groupref,omitempty"`
+	Ids                  []*Identity `protobuf:"bytes,3,rep,name=ids,proto3" json:"ids,omitempty"`
+	Threshold            int64       `protobuf:"varint,4,opt,name=threshold,proto3" json:"threshold,omitempty"`
+	Signature            []byte      `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
+	TimeStamp            int64       `protobuf:"varint,6,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"`
+	Status               string      `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
+	XXX_unrecognized     []byte      `json:"-"`
+	XXX_sizecache        int32       `json:"-"`
+}
+
+func (m *SharingGroup) Reset()         { *m = SharingGroup{} }
+func (m *SharingGroup) String() string { return proto.CompactTextString(m) }
+func (*SharingGroup) ProtoMessage()    {}
+func (*SharingGroup) Descriptor() ([]byte, []int) {
+	return fileDescriptor_2a25dace11219bce, []int{11}
+}
+
+func (m *SharingGroup) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_SharingGroup.Unmarshal(m, b)
+}
+func (m *SharingGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_SharingGroup.Marshal(b, m, deterministic)
+}
+func (m *SharingGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SharingGroup.Merge(m, src)
+}
+func (m *SharingGroup) XXX_Size() int {
+	return xxx_messageInfo_SharingGroup.Size(m)
+}
+func (m *SharingGroup) XXX_DiscardUnknown() {
+	xxx_messageInfo_SharingGroup.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SharingGroup proto.InternalMessageInfo
+
+func (m *SharingGroup) GetGroupid() int64 {
+	if m != nil {
+		return m.Groupid
+	}
+	return 0
+}
+
+func (m *SharingGroup) GetGroupref() string {
+	if m != nil {
+		return m.Groupref
+	}
+	return ""
+}
+
+func (m *SharingGroup) GetIds() []*Identity {
+	if m != nil {
+		return m.Ids
+	}
+	return nil
+}
+
+func (m *SharingGroup) GetThreshold() int64 {
+	if m != nil {
+		return m.Threshold
+	}
+	return 0
+}
+
+func (m *SharingGroup) GetSignature() []byte {
+	if m != nil {
+		return m.Signature
+	}
+	return nil
+}
+
+func (m *SharingGroup) GetTimeStamp() int64 {
+	if m != nil {
+		return m.TimeStamp
 	}
 	return 0
 }
 
-func (m *Policy) GetName() string {
+func (m *SharingGroup) GetStatus() string {
 	if m != nil {
-		return m.Name
+		return m.Status
 	}
 	return ""
 }
 
+// Identity of a sharing group
+type Identity struct {
+	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	IdRef                string   `protobuf:"bytes,2,opt,name=idRef,proto3" json:"idRef,omitempty"`
+	IdType               string   `protobuf:"bytes,3,opt,name=idType,proto3" json:"idType,omitempty"`
+	Share                []byte   `protobuf:"bytes,4,opt,name=share,proto3" json:"share,omitempty"`
+	Status               string   `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
+	TimeStamp            int64    `protobuf:"varint,6,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Identity) Reset()         { *m = Identity{} }
+func (m *Identity) String() string { return proto.CompactTextString(m) }
+func (*Identity) ProtoMessage()    {}
+func (*Identity) Descriptor() ([]byte, []int) {
+	return fileDescriptor_2a25dace11219bce, []int{12}
+}
+
+func (m *Identity) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Identity.Unmarshal(m, b)
+}
+func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Identity.Marshal(b, m, deterministic)
+}
+func (m *Identity) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Identity.Merge(m, src)
+}
+func (m *Identity) XXX_Size() int {
+	return xxx_messageInfo_Identity.Size(m)
+}
+func (m *Identity) XXX_DiscardUnknown() {
+	xxx_messageInfo_Identity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Identity proto.InternalMessageInfo
+
+func (m *Identity) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *Identity) GetIdRef() string {
+	if m != nil {
+		return m.IdRef
+	}
+	return ""
+}
+
+func (m *Identity) GetIdType() string {
+	if m != nil {
+		return m.IdType
+	}
+	return ""
+}
+
+func (m *Identity) GetShare() []byte {
+	if m != nil {
+		return m.Share
+	}
+	return nil
+}
+
+func (m *Identity) GetStatus() string {
+	if m != nil {
+		return m.Status
+	}
+	return ""
+}
+
+func (m *Identity) GetTimeStamp() int64 {
+	if m != nil {
+		return m.TimeStamp
+	}
+	return 0
+}
+
 type PlainTestMessage1 struct {
 	Nametest1            string   `protobuf:"bytes,1,opt,name=Nametest1,proto3" json:"Nametest1,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -719,7 +1005,7 @@ func (m *PlainTestMessage1) Reset()         { *m = PlainTestMessage1{} }
 func (m *PlainTestMessage1) String() string { return proto.CompactTextString(m) }
 func (*PlainTestMessage1) ProtoMessage()    {}
 func (*PlainTestMessage1) Descriptor() ([]byte, []int) {
-	return fileDescriptor_2a25dace11219bce, []int{10}
+	return fileDescriptor_2a25dace11219bce, []int{13}
 }
 
 func (m *PlainTestMessage1) XXX_Unmarshal(b []byte) error {
@@ -758,7 +1044,7 @@ func (m *EncryptTestMessage1) Reset()         { *m = EncryptTestMessage1{} }
 func (m *EncryptTestMessage1) String() string { return proto.CompactTextString(m) }
 func (*EncryptTestMessage1) ProtoMessage()    {}
 func (*EncryptTestMessage1) Descriptor() ([]byte, []int) {
-	return fileDescriptor_2a25dace11219bce, []int{11}
+	return fileDescriptor_2a25dace11219bce, []int{14}
 }
 
 func (m *EncryptTestMessage1) XXX_Unmarshal(b []byte) error {
@@ -797,7 +1083,7 @@ func (m *SimpleString) Reset()         { *m = SimpleString{} }
 func (m *SimpleString) String() string { return proto.CompactTextString(m) }
 func (*SimpleString) ProtoMessage()    {}
 func (*SimpleString) Descriptor() ([]byte, []int) {
-	return fileDescriptor_2a25dace11219bce, []int{12}
+	return fileDescriptor_2a25dace11219bce, []int{15}
 }
 
 func (m *SimpleString) XXX_Unmarshal(b []byte) error {
@@ -835,7 +1121,10 @@ func init() {
 	proto.RegisterType((*OrderPart2)(nil), "documents.OrderPart2")
 	proto.RegisterType((*OrderPart3)(nil), "documents.OrderPart3")
 	proto.RegisterType((*OrderPart4)(nil), "documents.OrderPart4")
-	proto.RegisterType((*Policy)(nil), "documents.Policy")
+	proto.RegisterType((*PolicyWrapper)(nil), "documents.PolicyWrapper")
+	proto.RegisterType((*Policy)(nil), "documents.policy")
+	proto.RegisterType((*SharingGroup)(nil), "documents.sharingGroup")
+	proto.RegisterType((*Identity)(nil), "documents.identity")
 	proto.RegisterType((*PlainTestMessage1)(nil), "documents.PlainTestMessage1")
 	proto.RegisterType((*EncryptTestMessage1)(nil), "documents.EncryptTestMessage1")
 	proto.RegisterType((*SimpleString)(nil), "documents.SimpleString")
@@ -844,65 +1133,85 @@ func init() {
 func init() { proto.RegisterFile("docs.proto", fileDescriptor_2a25dace11219bce) }
 
 var fileDescriptor_2a25dace11219bce = []byte{
-	// 956 bytes of a gzipped F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4, 0x50, 0xee, 0xc6, 0x09, 0x66, 0x0a, 0xab, 0x0d, 0x77, 0xe2, 0x5a, 0xce, 0x23, 0xb5,
-	0x2e, 0x93, 0x5a, 0x56, 0x03, 0xea, 0x23, 0xee, 0xfa, 0x13, 0x1c, 0xc9, 0x80, 0x7b, 0x63, 0x15,
-	0x65, 0x4f, 0x78, 0x12, 0xbd, 0xa4, 0x82, 0x89, 0x78, 0x5c, 0xd5, 0x5f, 0x4b, 0xed, 0x7f, 0x03,
-	0x00, 0x00, 0xff, 0xff, 0x54, 0x80, 0x91, 0x77, 0xad, 0x09, 0x00, 0x00,
+	// 1267 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x4b, 0x6f, 0x1c, 0xc5,
+	0x13, 0xd7, 0x78, 0xec, 0x8d, 0xa7, 0xbc, 0xf6, 0xdf, 0xe9, 0x38, 0xc9, 0x28, 0xff, 0x08, 0x5b,
+	0x23, 0x83, 0x0c, 0xc2, 0x36, 0x59, 0x3b, 0x11, 0x58, 0x20, 0x14, 0xef, 0x86, 0xb0, 0xe2, 0xb5,
+	0xf4, 0x5a, 0x06, 0x29, 0x4a, 0xa4, 0xf1, 0x74, 0x79, 0xb7, 0x95, 0xdd, 0xe9, 0xd1, 0x4c, 0x6f,
+	0x92, 0x15, 0x70, 0xe6, 0xc0, 0x81, 0x03, 0x5c, 0xb9, 0x20, 0xe5, 0xca, 0x11, 0xbe, 0x00, 0x5f,
+	0x03, 0x59, 0xf8, 0x00, 0xe2, 0x13, 0xc0, 0x0d, 0xd4, 0x3d, 0xaf, 0x1e, 0xdb, 0x1b, 0xe7, 0x80,
+	0xc4, 0x9e, 0xba, 0x5e, 0xdd, 0xf5, 0xf8, 0x55, 0xd5, 0x2c, 0x00, 0x13, 0x41, 0xb2, 0x11, 0xc5,
+	0x42, 0x0a, 0xe2, 0x30, 0x11, 0x8c, 0x86, 0x18,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xb8, 0x87, 0x89, 0xcc,
+	0x3e, 0xa9, 0x6f, 0x28, 0x93, 0x0f, 0xfd, 0x21, 0x4a, 0x4c, 0xe4, 0x8d, 0xcc, 0xcb, 0x92, 0xe1,
+	0x6d, 0xc1, 0xa5, 0x6c, 0xb0, 0x4c, 0x32, 0x6a, 0x9c, 0x34, 0x6a, 0x78, 0x6b, 0x50, 0xef, 0x72,
+	0xd5, 0x55, 0x5d, 0xa9, 0x4a, 0xac, 0xaa, 0xdb, 0x14, 0xa1, 0xc4, 0x30, 0x1f, 0x27, 0x39, 0x79,
+	0x50, 0xd3, 0xff, 0x32, 0xb6, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x63, 0xbb, 0xd8, 0x02, 0xe5,
+	0x0c, 0x00, 0x00,
 }
diff --git a/libs/documents/docs.proto b/libs/documents/docs.proto
index 737d112..f57e42d 100644
--- a/libs/documents/docs.proto
+++ b/libs/documents/docs.proto
@@ -85,6 +85,7 @@ message OrderDocument {
     OrderPart2 OrderPart2    = 7;
     OrderPart3 OrderPart3    = 8;
     OrderPart4 OrderPart4    = 9;
+    policy policy            = 10;
 }
 
 message OrderPart2 {
@@ -106,10 +107,42 @@ message OrderPart4 {
     int64 Timestamp         = 3 [(validator.field) = {int_gt:1564050341,int_lt:32521429541}];
 }
 
+message PolicyWrapper{
+    policy policy = 1;
+}
+
+message policy{
+    string example                      = 2;
+    string walletRef                    = 3;
+    string nodeId                       = 4;
+    int64 coin                          = 5;
+    repeated sharingGroup sharingGroups = 6;
+    int64 participantCount              = 7;
+	int64 threshold                     = 8;
+	repeated int64 signers              = 9;
+	string publicAddress                = 10;
+	string beneficiarydocid             = 11;
+    int64 dateTime                      = 12 [(validator.field) = {int_gt:1564050341,int_lt:32521429541}];
+}
+
+message sharingGroup {
+	int64 groupid         = 1;  
+	string groupref       = 2;
+	repeated identity ids = 3;
+	int64 threshold       = 4;
+	bytes signature       = 5;
+	int64 timeStamp       = 6;
+	string status         = 7;
+}
 
-message Policy{
-    float Version = 1;
-    string Name   = 2; 
+// Identity of a sharing group
+message identity {
+    string id       = 1;
+	string idRef    = 2;
+	string idType   = 3;
+	bytes share     = 4;
+	string status   = 5;
+	int64 timeStamp = 6;
 }
 
 message PlainTestMessage1 {
diff --git a/libs/documents/docs.validator.pb.go b/libs/documents/docs.validator.pb.go
index 905146b..ea66ec7 100644
--- a/libs/documents/docs.validator.pb.go
+++ b/libs/documents/docs.validator.pb.go
@@ -5,12 +5,12 @@ package documents
 
 import (
 	fmt "fmt"
-	_ "github.com/gogo/protobuf/gogoproto"
+	math "math"
 	proto "github.com/golang/protobuf/proto"
 	_ "github.com/mwitkow/go-proto-validators"
-	github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
-	math "math"
+	_ "github.com/gogo/protobuf/gogoproto"
 	regexp "regexp"
+	github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
 )
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -115,6 +115,11 @@ func (this *OrderDocument) Validate() error {
 			return github_com_mwitkow_go_proto_validators.FieldError("OrderPart4", err)
 		}
 	}
+	if this.Policy != nil {
+		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Policy); err != nil {
+			return github_com_mwitkow_go_proto_validators.FieldError("Policy", err)
+		}
+	}
 	return nil
 }
 
@@ -162,7 +167,41 @@ func (this *OrderPart4) Validate() error {
 	}
 	return nil
 }
+func (this *PolicyWrapper) Validate() error {
+	if this.Policy != nil {
+		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Policy); err != nil {
+			return github_com_mwitkow_go_proto_validators.FieldError("Policy", err)
+		}
+	}
+	return nil
+}
 func (this *Policy) Validate() error {
+	for _, item := range this.SharingGroups {
+		if item != nil {
+			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
+				return github_com_mwitkow_go_proto_validators.FieldError("SharingGroups", err)
+			}
+		}
+	}
+	if !(this.DateTime > 1564050341) {
+		return github_com_mwitkow_go_proto_validators.FieldError("DateTime", fmt.Errorf(`value '%v' must be greater than '1564050341'`, this.DateTime))
+	}
+	if !(this.DateTime < 32521429541) {
+		return github_com_mwitkow_go_proto_validators.FieldError("DateTime", fmt.Errorf(`value '%v' must be less than '32521429541'`, this.DateTime))
+	}
+	return nil
+}
+func (this *SharingGroup) Validate() error {
+	for _, item := range this.Ids {
+		if item != nil {
+			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
+				return github_com_mwitkow_go_proto_validators.FieldError("Ids", err)
+			}
+		}
+	}
+	return nil
+}
+func (this *Identity) Validate() error {
 	return nil
 }
 func (this *PlainTestMessage1) Validate() error {
diff --git a/libs/documents/policy_test.go b/libs/documents/policy_test.go
new file mode 100644
index 0000000..a0dbdff
--- /dev/null
+++ b/libs/documents/policy_test.go
@@ -0,0 +1,61 @@
+package documents
+
+import (
+	"fmt"
+	"io/ioutil"
+	"testing"
+
+	"github.com/gogo/protobuf/jsonpb"
+	"github.com/stretchr/testify/assert"
+)
+
+//Test_PolicyReadSamples - read in sample JSON polcies and ensure they are correctly
+//parsed into JSON and then Protobuffer formats
+
+func Test_PolicyReadSamples(t *testing.T) {
+	var policy *Policy
+	var err error
+	policy, err = ValidateJSONPolicyDoc("single.json")
+	assert.Nil(t, err, "Error parsing JSON ")
+	assert.NotNil(t, policy, "Policy should not be nil")
+	assert.Equal(t, int64(7), policy.ParticipantCount, "Participant count incorrect")
+
+	policy, err = ValidateJSONPolicyDoc("manager.json")
+	assert.Nil(t, err, "Error parsing JSON ")
+	assert.NotNil(t, policy, "Policy should not be nil")
+
+	policy, err = ValidateJSONPolicyDoc("one_sg_two_of_three.json")
+	assert.Nil(t, err, "Error parsing JSON ")
+	assert.NotNil(t, policy, "Policy should not be nil")
+
+	policy, err = ValidateJSONPolicyDoc("t_equals_p.json")
+	assert.Nil(t, err, "Error parsing JSON ")
+	assert.NotNil(t, policy, "Policy should not be nil")
+
+	policy, err = ValidateJSONPolicyDoc("three_groups.json")
+	assert.Nil(t, err, "Error parsing JSON ")
+	assert.NotNil(t, policy, "Policy should not be nil")
+
+	policy, err = ValidateJSONPolicyDoc("two_sg.json")
+	assert.Nil(t, err, "Error parsing JSON ")
+	assert.NotNil(t, policy, "Policy should not be nil")
+
+	policy, err = ValidateJSONPolicyDoc("bad.json")
+	assert.NotNil(t, err, "No Error parsing JSON ")
+	print(policy)
+}
+
+func ValidateJSONPolicyDoc(filename string) (*Policy, error) {
+	filepath := fmt.Sprintf("test-policy-documents/%s", filename)
+	dat, err := ioutil.ReadFile(filepath)
+	if err != nil {
+		return &Policy{}, err
+	}
+	pol := &PolicyWrapper{}
+	err = jsonpb.UnmarshalString(string(dat), pol)
+
+	if err != nil {
+		return nil, err
+	}
+	return pol.Policy, err
+}
diff --git a/libs/documents/test-policy-documents/bad.json b/libs/documents/test-policy-documents/bad.json
new file mode 100644
index 0000000..e4dc872
--- /dev/null
+++ b/libs/documents/test-policy-documents/bad.json
@@ -0,0 +1,56 @@
+{
+    "policy": {
+        "example": "Three Groups - \"Follow The Sun\"",
+        "walletRef":"HNW-267377t",
+        "beneficiarydocid":"",
+        "nodeId": "123",
+        "coin": 1,
+        "sharingGroups": [
+            {
+                "groupref": "USA",
+                "threshold": 1,
+                "ids": [
+                    {
+                        "id": "alice",
+                        "idType": "oidc",
+                        "idRef": "Alice"
+                    }, {
+                        "id": "bob",
+                        "idType": "oidc",
+                        "idRef": "Bob"
+                    }
+                ]
+            }, {
+                "groupref": "Europe",
+                "threshold": 1,
+                "ids": [
+                    {
+                        "id": "charlie",
+                        "idType": "oidc",
+                        "idRef": "Charlie"
+                    }, {
+                        "id": "delores",
+                        "idType": "oidc",
+                        "idRef": "Delores"
+                    }
+                ]
+            }, {
+                "groupref": "Asia",
+                "threshold": 1,
+                "ids": [
+                	{
+                        "id": "ethel",
+                        "idType": "oidc",
+                        "idRef": "Ethel"
+                    }, {
+                        "id": 0,
+                        "idType": "oidc",
+                        "idRef": "Freda"
+                    }
+                ]
+            }
+
+        ],
+        "participantCount": 7
+    }
+}
\ No newline at end of file
diff --git a/libs/documents/test-policy-documents/manager.json b/libs/documents/test-policy-documents/manager.json
new file mode 100644
index 0000000..a1b6bb1
--- /dev/null
+++ b/libs/documents/test-policy-documents/manager.json
@@ -0,0 +1,45 @@
+{"policy":
+	{
+		    "example":"One Group And One Manager",
+			"walletRef": "998-CD2561",
+			"beneficiarydocid":"",
+			"nodeId": "123",
+			"coin": 1,
+			"sharingGroups": [
+					{
+							"groupref": "Back Office Team",
+							"threshold":2,
+							"ids": [
+									{
+											"id": "alice",
+											"idType": "oidc",
+											"idRef": "Alice"
+									},
+									{
+											"id": "bob",
+											"idType": "oidc",
+											"idRef": "Bob"
+									},
+									{
+											"id": "charlie",
+											"idType": "oidc",
+											"idRef": "Charlie"
+									}
+							]
+					},
+					{
+							"groupref": "Manager",
+							"threshold":1,
+							"ids": [
+									{
+											"id": "delores",
+											"idType": "oidc",
+											"idRef": "Delores = The Manager"
+									}
+							]
+					}
+					
+			],
+			"participantCount": 7
+	  }
+	}
\ No newline at end of file
diff --git a/libs/documents/test-policy-documents/one_sg_two_of_three.json b/libs/documents/test-policy-documents/one_sg_two_of_three.json
new file mode 100644
index 0000000..ee4fb63
--- /dev/null
+++ b/libs/documents/test-policy-documents/one_sg_two_of_three.json
@@ -0,0 +1,32 @@
+{
+    "policy": {
+        "example":"One Group, Two Out Of Three",
+        "walletRef": "AB-2568-2227",
+			"beneficiarydocid":"",
+        "nodeId": "123",
+        "coin": 1,
+        "sharingGroups": [
+            {
+                "groupref": "Back Office Team",
+                "threshold": 2,
+                "ids": [
+                    {
+                        "id": "alice",
+                        "idType": "oidc",
+                        "idRef": "Alice Jones"
+                    }, {
+                        "id": "bob",
+                        "idType": "oidc",
+                        "idRef": "Bob Smith"
+                    }, {
+                        "id": "charlie",
+                        "idType": "oidc",
+                        "idRef": "Charlie Green"
+                    }
+                ]
+            }
+
+        ],
+        "participantCount": 7
+    }
+}
\ No newline at end of file
diff --git a/libs/documents/test-policy-documents/single.json b/libs/documents/test-policy-documents/single.json
new file mode 100644
index 0000000..f642d4d
--- /dev/null
+++ b/libs/documents/test-policy-documents/single.json
@@ -0,0 +1,23 @@
+{"policy":
+	{   "example":"single fiduciary",
+		"walletRef": "CD-2367-227",
+		"beneficiarydocid":"",
+		"nodeId": "123",
+		"coin": 0,
+		"sharingGroups": [
+					{
+							"groupref": "Back Office Team",
+							"threshold":1,
+							"ids": [
+									{
+											"id": "alice",
+											"idType": "oidc",
+											"idRef": "Alice"
+									}
+							]
+					}
+					
+			],
+		"participantCount": 7
+	  }
+	}
\ No newline at end of file
diff --git a/libs/documents/test-policy-documents/t_equals_p.json b/libs/documents/test-policy-documents/t_equals_p.json
new file mode 100644
index 0000000..4fd812a
--- /dev/null
+++ b/libs/documents/test-policy-documents/t_equals_p.json
@@ -0,0 +1,31 @@
+{
+    "policy": {
+        "example":"One Group T = P",
+        "walletRef": "GG-8453437568",
+			"beneficiarydocid":"",
+        "nodeId": "123",
+        "coin": 1,
+        "sharingGroups": [
+            {
+                "groupref": "Back Office Team",
+                "threshold": 3,
+                "ids": [
+                    {
+                        "id": "alice",
+                        "idType": "oidc",
+                        "idRef": "Alice"
+                    }, {
+                        "id": "bob",
+                        "idType": "oidc",
+                        "idRef": "Bob"
+                    }, {
+                        "id": "charlie",
+                        "idType": "oidc",
+                        "idRef": "Charlie"
+                    }
+                ]
+            }
+        ],
+        "participantCount": 7
+    }
+}
\ No newline at end of file
diff --git a/libs/documents/test-policy-documents/three_groups.json b/libs/documents/test-policy-documents/three_groups.json
new file mode 100644
index 0000000..fff17d6
--- /dev/null
+++ b/libs/documents/test-policy-documents/three_groups.json
@@ -0,0 +1,56 @@
+{
+    "policy": {
+        "example": "Three Groups - \"Follow The Sun\"",
+        "walletRef":"HNW-267377t",
+        "beneficiarydocid":"",
+        "nodeId": "123",
+        "coin": 1,
+        "sharingGroups": [
+            {
+                "groupref": "USA",
+                "threshold": 1,
+                "ids": [
+                    {
+                        "id": "alice",
+                        "idType": "oidc",
+                        "idRef": "Alice"
+                    }, {
+                        "id": "bob",
+                        "idType": "oidc",
+                        "idRef": "Bob"
+                    }
+                ]
+            }, {
+                "groupref": "Europe",
+                "threshold": 1,
+                "ids": [
+                    {
+                        "id": "charlie",
+                        "idType": "oidc",
+                        "idRef": "Charlie"
+                    }, {
+                        "id": "delores",
+                        "idType": "oidc",
+                        "idRef": "Delores"
+                    }
+                ]
+            }, {
+                "groupref": "Asia",
+                "threshold": 1,
+                "ids": [
+                	{
+                        "id": "ethel",
+                        "idType": "oidc",
+                        "idRef": "Ethel"
+                    }, {
+                        "id": "freda",
+                        "idType": "oidc",
+                        "idRef": "Freda"
+                    }
+                ]
+            }
+
+        ],
+        "participantCount": 7
+    }
+}
\ No newline at end of file
diff --git a/libs/documents/test-policy-documents/two_sg.json b/libs/documents/test-policy-documents/two_sg.json
new file mode 100644
index 0000000..12441b6
--- /dev/null
+++ b/libs/documents/test-policy-documents/two_sg.json
@@ -0,0 +1,55 @@
+{"policy":
+	{
+		"example": "Two Groups - Two Out Of Three",
+		"walletRef":"BOFA-23789TY",
+		"beneficiarydocid":"",
+			"nodeId": "123",
+			"coin": 1,
+			"sharingGroups": [
+					{
+							"groupref": "Back Office Team",
+							"threshold":2,
+							"ids": [
+									{
+											"id": "alice",
+											"idType": "oidc",
+											"idRef": "Alice"
+									},
+									{
+											"id": "bob",
+											"idType": "oidc",
+											"idRef": "Bob"
+									},
+									{
+											"id": "charlie",
+											"idType": "oidc",
+											"idRef": "Charlie"
+									}
+							]
+					},
+					{
+							"groupref": "Compliance Team",
+							"threshold":2,
+							"ids": [
+									{
+											"id": "delores",
+											"idType": "oidc",
+											"idRef": "Delores"
+									},
+									{
+											"id": "ethel",
+											"idType": "oidc",
+											"idRef": "Ethel"
+									},
+									{
+											"id": "freda",
+											"idType": "oidc",
+											"idRef": "Freda"
+									}
+							]
+					}
+					
+			],
+			"participantCount": 7
+	  }
+	}
\ No newline at end of file