From 39363709202bdc8030e9f7ac7fa730ba92534fc7 Mon Sep 17 00:00:00 2001 From: Adam Cattermole Date: Wed, 6 Nov 2024 15:07:54 +0000 Subject: [PATCH 1/2] Update local deployment configuration Signed-off-by: Adam Cattermole --- utils/deploy/authconfig.yaml | 2 +- utils/deploy/envoy.yaml | 4 ++-- utils/kustomize/authorino/authorino.yaml | 2 +- utils/kustomize/limitador/limitador.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/deploy/authconfig.yaml b/utils/deploy/authconfig.yaml index 4b659679..2a709577 100644 --- a/utils/deploy/authconfig.yaml +++ b/utils/deploy/authconfig.yaml @@ -1,5 +1,5 @@ --- -apiVersion: authorino.kuadrant.io/v1beta2 +apiVersion: authorino.kuadrant.io/v1beta3 kind: AuthConfig metadata: name: talker-api-protection diff --git a/utils/deploy/envoy.yaml b/utils/deploy/envoy.yaml index 38d05168..eafb4d92 100644 --- a/utils/deploy/envoy.yaml +++ b/utils/deploy/envoy.yaml @@ -24,7 +24,7 @@ data: - endpoint: address: socket_address: - address: sample-authorino-authorization + address: authorino-authorino-authorization port_value: 50051 - name: limitador connect_timeout: 1s @@ -42,7 +42,7 @@ data: - endpoint: address: socket_address: - address: limitador-sample + address: limitador-limitador port_value: 8081 - name: talker-api connect_timeout: 0.25s diff --git a/utils/kustomize/authorino/authorino.yaml b/utils/kustomize/authorino/authorino.yaml index 467b71e0..16eda85a 100644 --- a/utils/kustomize/authorino/authorino.yaml +++ b/utils/kustomize/authorino/authorino.yaml @@ -2,7 +2,7 @@ apiVersion: operator.authorino.kuadrant.io/v1beta1 kind: Authorino metadata: - name: sample + name: authorino spec: clusterWide: true authConfigLabelSelectors: "" diff --git a/utils/kustomize/limitador/limitador.yaml b/utils/kustomize/limitador/limitador.yaml index 62869054..93823123 100644 --- a/utils/kustomize/limitador/limitador.yaml +++ b/utils/kustomize/limitador/limitador.yaml @@ -2,7 +2,7 @@ apiVersion: limitador.kuadrant.io/v1alpha1 kind: Limitador metadata: - name: sample + name: limitador spec: verbosity: 3 listener: From 6cc5638e84658f3c053f97fa37d16b93666ae3eb Mon Sep 17 00:00:00 2001 From: Adam Cattermole Date: Wed, 6 Nov 2024 15:15:48 +0000 Subject: [PATCH 2/2] Set the protobuf timestamp to the correct value Signed-off-by: Adam Cattermole --- src/service/auth.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/auth.rs b/src/service/auth.rs index c8e4a4d2..336b5018 100644 --- a/src/service/auth.rs +++ b/src/service/auth.rs @@ -7,7 +7,7 @@ use crate::envoy::{ }; use crate::service::grpc_message::{GrpcMessageResponse, GrpcMessageResult}; use crate::service::GrpcService; -use chrono::{DateTime, FixedOffset, Timelike}; +use chrono::{DateTime, FixedOffset}; use log::{debug, warn}; use protobuf::well_known_types::Timestamp; use protobuf::Message; @@ -100,8 +100,8 @@ impl AuthService { .expect("Error!") .map_or(Timestamp::new(), |date_time: DateTime| { Timestamp { - nanos: date_time.nanosecond() as i32, - seconds: date_time.second() as i64, + nanos: date_time.timestamp_subsec_nanos() as i32, + seconds: date_time.timestamp(), unknown_fields: Default::default(), cached_size: Default::default(), }