Skip to content

Commit

Permalink
feat: add ca information
Browse files Browse the repository at this point in the history
  • Loading branch information
fritterhoff committed Nov 28, 2024
1 parent c2a6af7 commit f536d5c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/pki-rest-interface/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.23

require (
github.com/getkin/kin-openapi v0.128.0
github.com/hm-edu/portal-apis v0.0.0-20230929065638-ad1f7e7c7ab3
github.com/hm-edu/portal-apis v0.0.0-20241128063248-b872e0b712f3
github.com/hm-edu/portal-common v0.0.0-20241127091109-fb34d94d9320
github.com/johnbellone/grpc-middleware-sentry v0.4.0
github.com/labstack/echo/v4 v4.12.0
Expand Down
2 changes: 2 additions & 0 deletions backend/pki-rest-interface/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hm-edu/portal-apis v0.0.0-20230929065638-ad1f7e7c7ab3 h1:XrnVZ89D8r7kXCmPsPCa+MtjZJvhhqT1Bkix5iH0sRQ=
github.com/hm-edu/portal-apis v0.0.0-20230929065638-ad1f7e7c7ab3/go.mod h1:o2FYTwt6w4uXfIoPAFRQpxbOOhGjde0PiGZlErVVyZk=
github.com/hm-edu/portal-apis v0.0.0-20241128063248-b872e0b712f3 h1:gNVH6aztpfgTd/AKe0S/hhGS11dNKXkYgCJCi1xA+kw=
github.com/hm-edu/portal-apis v0.0.0-20241128063248-b872e0b712f3/go.mod h1:o2FYTwt6w4uXfIoPAFRQpxbOOhGjde0PiGZlErVVyZk=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso=
Expand Down
10 changes: 10 additions & 0 deletions backend/pki-rest-interface/pkg/api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ const docTemplate = `{
"SMIME"
],
"summary": "SMIME List Endpoint",
"parameters": [
{
"type": "string",
"name": "email",
"in": "query"
}
],
"responses": {
"200": {
"description": "certificates",
Expand Down Expand Up @@ -399,6 +406,9 @@ const docTemplate = `{
"portal_apis.SslCertificateDetails": {
"type": "object",
"properties": {
"ca": {
"type": "string"
},
"common_name": {
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion backend/pki-service/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ require (
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hm-edu/portal-apis v0.0.0-20230929065638-ad1f7e7c7ab3
github.com/hm-edu/portal-apis v0.0.0-20241128063248-b872e0b712f3
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0
go.opentelemetry.io/otel v1.32.0
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions backend/pki-service/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,15 @@ github.com/hashicorp/hcl/v2 v2.23.0 h1:Fphj1/gCylPxHutVSEOf2fBOh1VE4AuLV7+kbJf3q
github.com/hashicorp/hcl/v2 v2.23.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA=
github.com/hm-edu/portal-apis v0.0.0-20230929065638-ad1f7e7c7ab3 h1:XrnVZ89D8r7kXCmPsPCa+MtjZJvhhqT1Bkix5iH0sRQ=
github.com/hm-edu/portal-apis v0.0.0-20230929065638-ad1f7e7c7ab3/go.mod h1:o2FYTwt6w4uXfIoPAFRQpxbOOhGjde0PiGZlErVVyZk=
github.com/hm-edu/portal-apis v0.0.0-20241128063248-b872e0b712f3 h1:gNVH6aztpfgTd/AKe0S/hhGS11dNKXkYgCJCi1xA+kw=
github.com/hm-edu/portal-apis v0.0.0-20241128063248-b872e0b712f3/go.mod h1:o2FYTwt6w4uXfIoPAFRQpxbOOhGjde0PiGZlErVVyZk=
github.com/hm-edu/sectigo-client v0.0.0-20241031061939-624d3bb3496f h1:YpQ6SRMwBh07ou5ESDNkL2zsxI6E6J5mC03IZMTFYOk=
github.com/hm-edu/sectigo-client v0.0.0-20241031061939-624d3bb3496f/go.mod h1:NLHh0Bp3ZoEocoqAA00E++K8blzgTT38LsoOMbNZn00=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso=
github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA=
github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
Expand All @@ -138,6 +141,7 @@ github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5W
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
Expand Down
5 changes: 5 additions & 0 deletions backend/pki-service/pkg/grpc/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func mapCertificate(x *ent.Certificate) *pb.SslCertificateDetails {
if x.Source != nil {
source = *x.Source
}
ca := ""
if x.Ca != nil {
ca = *x.Ca
}
return &pb.SslCertificateDetails{
Id: int32(x.SslId),
DbId: int32(x.ID),
Expand All @@ -74,6 +78,7 @@ func mapCertificate(x *ent.Certificate) *pb.SslCertificateDetails {
Source: source,
IssuedBy: issuedBy,
Created: created,
Ca: ca,
}
}

Expand Down

0 comments on commit f536d5c

Please sign in to comment.