Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
quant
Commits
3b31727f
Commit
3b31727f
authored
11 months ago
by
Malte Bauch
Committed by
Fabian Seidl
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add timeout within ksaReqHandler
See merge request
!141
parent
e11638c9
No related branches found
No related tags found
1 merge request
!141
Add timeout within ksaReqHandler
Pipeline
#201867
passed
11 months ago
Stage: build
Stage: test
Stage: analyze
Stage: build-latest
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
go.mod
+0
-17
0 additions, 17 deletions
go.mod
go.sum
+0
-99
0 additions, 99 deletions
go.sum
goKMS/kms/akms/server/server.go
+10
-1
10 additions, 1 deletion
goKMS/kms/akms/server/server.go
with
10 additions
and
117 deletions
go.mod
+
0
−
17
View file @
3b31727f
...
...
@@ -15,8 +15,6 @@ require (
github.com/prometheus/procfs
v0.15.1
github.com/shirou/gopsutil
v3.21.11+incompatible
github.com/sirupsen/logrus
v1.9.3
github.com/spf13/cobra
v1.8.0
github.com/spf13/viper
v1.19.0
github.com/stretchr/testify
v1.9.0
golang.org/x/sys
v0.21.0
google.golang.org/genproto/googleapis/api
v0.0.0-20240604185151-ef581f913117
...
...
@@ -28,33 +26,18 @@ require (
require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go
v1.33.0-20240221180331-f05a6f4403ce.1 // indirect
github.com/davecgh/go-spew
v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify
v1.7.0 // indirect
github.com/go-ole/go-ole
v1.3.0 // indirect
github.com/golang/glog
v1.2.0 // indirect
github.com/golang/protobuf
v1.5.4 // indirect
github.com/google/go-cmp
v0.6.0 // indirect
github.com/hashicorp/errwrap
v1.1.0 // indirect
github.com/hashicorp/hcl
v1.0.0 // indirect
github.com/inconshreveable/mousetrap
v1.1.0 // indirect
github.com/kylelemons/godebug
v1.1.0 // indirect
github.com/magiconair/properties
v1.8.7 // indirect
github.com/mitchellh/mapstructure
v1.5.0 // indirect
github.com/pelletier/go-toml/v2
v2.2.2 // indirect
github.com/pmezard/go-difflib
v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/sagikazarmark/locafero
v0.4.0 // indirect
github.com/sagikazarmark/slog-shim
v0.1.0 // indirect
github.com/sourcegraph/conc
v0.3.0 // indirect
github.com/spf13/afero
v1.11.0 // indirect
github.com/spf13/cast
v1.6.0 // indirect
github.com/spf13/pflag
v1.0.5 // indirect
github.com/subosito/gotenv
v1.6.0 // indirect
github.com/tklauser/go-sysconf
v0.3.13 // indirect
github.com/tklauser/numcpus
v0.7.0 // indirect
github.com/yusufpapurcu/wmi
v1.2.4 // indirect
go.uber.org/multierr
v1.11.0 // indirect
golang.org/x/exp
v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/net
v0.23.0 // indirect
golang.org/x/text
v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc
v0.0.0-20240528184218-531527333157 // indirect
gopkg.in/ini.v1
v1.67.0 // indirect
)
This diff is collapsed.
Click to expand it.
go.sum
+
0
−
99
View file @
3b31727f
This diff is collapsed.
Click to expand it.
goKMS/kms/akms/server/server.go
+
10
−
1
View file @
3b31727f
...
...
@@ -2,7 +2,9 @@ package server
import
(
"encoding/json"
"fmt"
"net/http"
"time"
"code.fbi.h-da.de/danet/quant/goKMS/kms/event"
"github.com/google/uuid"
...
...
@@ -82,7 +84,14 @@ func ksaReqHandler(eventBus *event.EventBus, receiver *Receiver, generateAndSend
return
}
<-
receiverChan
select
{
case
<-
receiverChan
:
case
<-
time
.
After
(
20
*
time
.
Second
)
:
http
.
Error
(
w
,
fmt
.
Sprintf
(
"Platform Key exchange failed for RequestID: %s"
,
kmsKeyRequest
.
RequestID
),
http
.
StatusInternalServerError
)
logrus
.
Errorf
(
"Platform Key exchange failed for RequestID: %s"
,
kmsKeyRequest
.
RequestID
)
return
}
err
=
generateAndSend
(
kmsKeyRequest
.
ReceivingCKMSID
,
pathId
,
kmsKeyRequest
.
RequestID
,
kmsKeyRequest
.
KeyProperties
.
Number
)
if
err
!=
nil
{
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusInternalServerError
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment