Skip to content

Commit d9c3da1

Browse files
authored
Merge branch 'main' into makefile-local-context-check
2 parents 0bd132e + 07d50e5 commit d9c3da1

30 files changed

Lines changed: 531 additions & 84 deletions

.mergify.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
queue_rules:
2+
- name: default
3+
merge_method: squash
4+
queue_conditions:
5+
- check-success=End-to-End Tests
6+
- check-success=amber-review
7+
- check-success=validate-manifests
8+
- check-success=test-local-dev-simulation
9+
10+
pull_request_rules:
11+
- name: enqueue on approval
12+
conditions:
13+
- "#approved-reviews-by>=1"
14+
- "#changes-requested-reviews-by=0"
15+
actions:
16+
queue:
17+
name: default

components/ambient-api-server/cmd/ambient-api-server/environments/e_development.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ func (e *DevEnvImpl) OverrideDatabase(c *pkgenv.Database) error {
1818
}
1919

2020
func (e *DevEnvImpl) OverrideConfig(c *config.ApplicationConfig) error {
21-
c.Server.EnableJWT = false
22-
c.Server.EnableHTTPS = false
2321
c.Server.CORSAllowedHeaders = []string{"X-Ambient-Project"}
22+
c.Server.JwkCertFile = "secrets/kind-jwks.json"
23+
c.Server.JwkCertURL = ""
24+
c.Auth.EnableJWT = false
2425
return nil
2526
}
2627

@@ -38,11 +39,10 @@ func (e *DevEnvImpl) OverrideClients(c *pkgenv.Clients) error {
3839

3940
func (e *DevEnvImpl) Flags() map[string]string {
4041
return map[string]string{
41-
"v": "10",
42+
"v": "8",
4243
"enable-authz": "false",
4344
"debug": "false",
4445
"enable-mock": "true",
45-
"enable-https": "false",
4646
"enable-metrics-https": "false",
4747
"api-server-hostname": "localhost",
4848
"api-server-bindaddress": "localhost:8000",

components/ambient-api-server/cmd/ambient-api-server/environments/e_production.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ func (e *ProductionEnvImpl) OverrideDatabase(c *pkgenv.Database) error {
1919

2020
func (e *ProductionEnvImpl) OverrideConfig(c *config.ApplicationConfig) error {
2121
c.Server.CORSAllowedHeaders = []string{"X-Ambient-Project"}
22+
c.Server.JwkCertURL = "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/certs"
23+
c.Server.JwkCertFile = ""
24+
c.Auth.JwkCertURL = "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/certs"
2225
return nil
2326
}
2427

components/ambient-api-server/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/gorilla/mux v1.7.3
1111
github.com/onsi/gomega v1.27.1
1212
github.com/openshift-online/ocm-sdk-go v0.1.334
13-
github.com/openshift-online/rh-trex-ai v0.0.14
13+
github.com/openshift-online/rh-trex-ai v0.0.19 // v0.0.14→v0.0.19: gRPC TLS support, JWT audience validation fix, OpenAPI generator improvements
1414
github.com/spf13/pflag v1.0.6
1515
google.golang.org/grpc v1.75.1
1616
google.golang.org/protobuf v1.36.11

components/ambient-api-server/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw
468468
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
469469
github.com/openshift-online/ocm-sdk-go v0.1.334 h1:45WSkXEsmpGekMa9kO6NpEG8PW5/gfmMekr7kL+1KvQ=
470470
github.com/openshift-online/ocm-sdk-go v0.1.334/go.mod h1:KYOw8kAKAHyPrJcQoVR82CneQ4ofC02Na4cXXaTq4Nw=
471-
github.com/openshift-online/rh-trex-ai v0.0.14 h1:uwWs1adDGJw24xyOKDX3PUTV9x7KBBx52ZPlkFWfkJc=
472-
github.com/openshift-online/rh-trex-ai v0.0.14/go.mod h1:uAKlJizd9Lu7uLckgyxhMMAA9Zr2LuH1XjtwJLc5uKU=
471+
github.com/openshift-online/rh-trex-ai v0.0.19 h1:Qj40SSPXrrunplRRvcevWwNZw3ZNvOp/o6lguA+grKw=
472+
github.com/openshift-online/rh-trex-ai v0.0.19/go.mod h1:uAKlJizd9Lu7uLckgyxhMMAA9Zr2LuH1XjtwJLc5uKU=
473473
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
474474
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
475475
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

components/ambient-api-server/plugins/projectSettings/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func init() {
4848
return NewServiceLocator(env.(*environments.Env))
4949
})
5050

51-
pkgserver.RegisterRoutes("project_settings", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware auth.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
51+
pkgserver.RegisterRoutes("project_settings", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware environments.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
5252
envServices := services.(*environments.Services)
5353
handler := NewProjectSettingsHandler(Service(envServices), generic.Service(envServices))
5454

components/ambient-api-server/plugins/projects/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func init() {
4848
return NewServiceLocator(env.(*environments.Env))
4949
})
5050

51-
pkgserver.RegisterRoutes("projects", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware auth.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
51+
pkgserver.RegisterRoutes("projects", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware environments.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
5252
envServices := services.(*environments.Services)
5353
projectHandler := NewProjectHandler(Service(envServices), generic.Service(envServices))
5454

components/ambient-api-server/plugins/sessions/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func init() {
4848
return NewServiceLocator(env.(*environments.Env))
4949
})
5050

51-
pkgserver.RegisterRoutes("sessions", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware auth.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
51+
pkgserver.RegisterRoutes("sessions", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware environments.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
5252
envServices := services.(*environments.Services)
5353
sessionHandler := NewSessionHandler(Service(envServices), generic.Service(envServices))
5454

components/ambient-api-server/plugins/users/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func init() {
4848
return NewServiceLocator(env.(*environments.Env))
4949
})
5050

51-
pkgserver.RegisterRoutes("users", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware auth.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
51+
pkgserver.RegisterRoutes("users", func(apiV1Router *mux.Router, services pkgserver.ServicesInterface, authMiddleware environments.JWTMiddleware, authzMiddleware auth.AuthorizationMiddleware) {
5252
envServices := services.(*environments.Services)
5353
userHandler := NewUserHandler(Service(envServices), generic.Service(envServices))
5454

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5432
1+
5432

0 commit comments

Comments
 (0)