Skip to content

Commit

Permalink
Do not overwrite services without authentication
Browse files Browse the repository at this point in the history
Recreate package and storage services for the internal API without
overwriting the existing ones used in the public API.

[skip-codecov]
  • Loading branch information
jraddaoui committed Oct 1, 2024
1 parent 3f4c090 commit 846f026
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/enduro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ func main() {
}

// Internal API server.
// Recreate package, storage and upload services. Same as above
// with different logger names and using &auth.NoopTokenVerifier{}.
// Recreate package and storage services with different
// logger names and using &auth.NoopTokenVerifier{}.
{
pkgsvc = package_.NewService(
ips := package_.NewService(
logger.WithName("internal-package"),
enduroDatabase,
temporalClient,
Expand All @@ -320,7 +320,7 @@ func main() {
cfg.Upload.MaxSize,
)

storagesvc, err = storage.NewService(
iss, err := storage.NewService(
logger.WithName("internal-storage"),
cfg.Storage,
storagePersistence,
Expand All @@ -337,7 +337,7 @@ func main() {

g.Add(
func() error {
srv = api.HTTPServer(logger, tp, &cfg.InternalAPI, pkgsvc, storagesvc)
srv = api.HTTPServer(logger, tp, &cfg.InternalAPI, ips, iss)
return srv.ListenAndServe()
},
func(err error) {
Expand Down

0 comments on commit 846f026

Please sign in to comment.