This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch refactor-with-go
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git
The following commit(s) were added to refs/heads/refactor-with-go by this push:
new c36bb873 Update authority proto (#1156)
c36bb873 is described below
commit c36bb87386f1e568a82ba3997dff03ec3ac1161d
Author: Albumen Kevin <[email protected]>
AuthorDate: Sat Jun 3 17:32:19 2023 +0800
Update authority proto (#1156)
---
pkg/authority/v1alpha1/authority.go | 3 +-
pkg/authority/v1alpha1/ca.pb.go | 84 +++++++++++++++++++++----------------
pkg/authority/v1alpha1/ca.proto | 5 ++-
3 files changed, 52 insertions(+), 40 deletions(-)
diff --git a/pkg/authority/v1alpha1/authority.go
b/pkg/authority/v1alpha1/authority.go
index e36e29ed..579ff4db 100644
--- a/pkg/authority/v1alpha1/authority.go
+++ b/pkg/authority/v1alpha1/authority.go
@@ -100,6 +100,7 @@ func (s *AuthorityServiceImpl) CreateIdentity(
TrustCerts: trustedCerts,
Token: token,
TrustedTokenPublicKeys: trustedTokenPublicKeys,
- ExpireTime: time.Now().UnixMilli() +
(s.Options.CertValidity / 2),
+ RefreshTime: time.Now().UnixMilli() +
(s.Options.CertValidity / 2),
+ ExpireTime: time.Now().UnixMilli() +
s.Options.CertValidity,
}, nil
}
diff --git a/pkg/authority/v1alpha1/ca.pb.go b/pkg/authority/v1alpha1/ca.pb.go
index 5baaf146..d74df2c2 100644
--- a/pkg/authority/v1alpha1/ca.pb.go
+++ b/pkg/authority/v1alpha1/ca.pb.go
@@ -110,8 +110,9 @@ type IdentityResponse struct {
TrustCerts []string
`protobuf:"bytes,3,rep,name=trust_certs,json=trustCerts,proto3"
json:"trust_certs,omitempty"`
Token string
`protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
TrustedTokenPublicKeys []string
`protobuf:"bytes,5,rep,name=trusted_token_public_keys,json=trustedTokenPublicKeys,proto3"
json:"trusted_token_public_keys,omitempty"`
- ExpireTime int64
`protobuf:"varint,6,opt,name=expire_time,json=expireTime,proto3"
json:"expire_time,omitempty"`
- Message string
`protobuf:"bytes,7,opt,name=message,proto3" json:"message,omitempty"`
+ RefreshTime int64
`protobuf:"varint,6,opt,name=refresh_time,json=refreshTime,proto3"
json:"refresh_time,omitempty"`
+ ExpireTime int64
`protobuf:"varint,7,opt,name=expire_time,json=expireTime,proto3"
json:"expire_time,omitempty"`
+ Message string
`protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *IdentityResponse) Reset() {
@@ -181,6 +182,13 @@ func (x *IdentityResponse) GetTrustedTokenPublicKeys()
[]string {
return nil
}
+func (x *IdentityResponse) GetRefreshTime() int64 {
+ if x != nil {
+ return x.RefreshTime
+ }
+ return 0
+}
+
func (x *IdentityResponse) GetExpireTime() int64 {
if x != nil {
return x.ExpireTime
@@ -336,7 +344,7 @@ var file_v1alpha1_ca_proto_rawDesc = []byte{
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x53,
0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x22,
- 0xf4, 0x01, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x52, 0x65, 0x73, 0x70,
+ 0x97, 0x02, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x12, 0x19,
0x0a, 0x08, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09,
@@ -347,42 +355,44 @@ var file_v1alpha1_ca_proto_rawDesc = []byte{
0x12, 0x39, 0x0a, 0x19, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f,
0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79,
0x73, 0x18, 0x05, 0x20,
0x03, 0x28, 0x09, 0x52, 0x16, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64,
0x54, 0x6f, 0x6b, 0x65,
- 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12,
0x1f, 0x0a, 0x0b, 0x65,
- 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x03,
- 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65,
0x12, 0x18, 0x0a, 0x07,
- 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x6d,
- 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x0a, 0x0e, 0x4f, 0x62,
0x73, 0x65, 0x72, 0x76,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
0x6e, 0x6f, 0x6e, 0x63,
+ 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12,
0x21, 0x0a, 0x0c, 0x72,
+ 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
0x06, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x1f,
+ 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54,
0x69, 0x6d, 0x65, 0x12,
+ 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08,
0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x0a,
0x0e, 0x4f, 0x62, 0x73,
+ 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x14, 0x0a, 0x05, 0x6e,
+ 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x6e, 0x6f, 0x6e, 0x63,
+ 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x0f, 0x4f, 0x62, 0x73,
0x65, 0x72, 0x76, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x6e, 0x6f, 0x6e, 0x63,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e,
0x63, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x0f, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76,
0x65, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e,
0x63, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x74,
- 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12,
- 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x03, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x12, 0x0a, 0x04, 0x64,
- 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x61, 0x74, 0x61, 0x32,
- 0x89, 0x01, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
0x79, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x49, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2f, 0x2e, 0x6f, 0x72, 0x67,
0x2e, 0x61, 0x70, 0x61,
- 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x61, 0x75,
0x74, 0x68, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x61, 0x70,
- 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x61,
0x75, 0x74, 0x68, 0x2e,
- 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32,
0x7f, 0x0a, 0x0b, 0x52,
- 0x75, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70,
0x0a, 0x07, 0x4f, 0x62,
- 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x2e, 0x2e, 0x6f, 0x72, 0x67, 0x2e,
0x61, 0x70, 0x61, 0x63,
- 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x61, 0x75, 0x74,
0x68, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72,
0x76, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6f, 0x72, 0x67, 0x2e,
0x61, 0x70, 0x61, 0x63,
- 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x61, 0x75, 0x74,
0x68, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72,
0x76, 0x65, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01,
0x42, 0x2d, 0x50, 0x01,
- 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x61, 0x70, 0x61,
- 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64,
0x6d, 0x69, 0x6e, 0x2f,
- 0x63, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62,
0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
+ 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x12,
+ 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x64, 0x61,
+ 0x74, 0x61, 0x32, 0x89, 0x01, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x74, 0x79,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x0e, 0x43,
0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2f, 0x2e,
0x6f, 0x72, 0x67, 0x2e,
+ 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f,
0x2e, 0x61, 0x75, 0x74,
+ 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49,
0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30,
0x2e, 0x6f, 0x72, 0x67,
+ 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62,
0x6f, 0x2e, 0x61, 0x75,
+ 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x49, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x32, 0x7f,
+ 0x0a, 0x0b, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x70, 0x0a,
+ 0x07, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x2e, 0x2e, 0x6f,
0x72, 0x67, 0x2e, 0x61,
+ 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e,
0x61, 0x75, 0x74, 0x68,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x62,
0x73, 0x65, 0x72, 0x76,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6f,
0x72, 0x67, 0x2e, 0x61,
+ 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e,
0x61, 0x75, 0x74, 0x68,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x62,
0x73, 0x65, 0x72, 0x76,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28,
0x01, 0x30, 0x01, 0x42,
+ 0x2d, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f,
+ 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f,
0x2d, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x2f, 0x63, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
0x61, 0x31, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/pkg/authority/v1alpha1/ca.proto b/pkg/authority/v1alpha1/ca.proto
index f3fbfe8f..8cff4b47 100644
--- a/pkg/authority/v1alpha1/ca.proto
+++ b/pkg/authority/v1alpha1/ca.proto
@@ -38,8 +38,9 @@ message IdentityResponse {
repeated string trust_certs = 3;
string token = 4;
repeated string trusted_token_public_keys = 5;
- int64 expire_time = 6;
- string message = 7;
+ int64 refresh_time = 6;
+ int64 expire_time = 7;
+ string message = 8;
}
service AuthorityService {