mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-03 21:02:15 +00:00
01fe34a526
# Which Problems Are Solved Opaque tokens now use authenticated encryption. # How the Problems Are Solved - Upgrade zitadel/oidc to v3.47 - Copy crypto implementation for refresh and session tokens (internal to zitadel) - Added config that allows validating old tokens for gradual roll-out # Additional Changes - Set NX cache for `integration-test-build` to `false`, working on a seperate fix. # Additional Context - closes #11315 --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: muhlemmer <[email protected]>
46 lines
1.2 KiB
Go
46 lines
1.2 KiB
Go
package eventsourcing
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/authz/repository"
|
|
authz_es "github.com/zitadel/zitadel/internal/authz/repository/eventsourcing/eventstore"
|
|
authz_view "github.com/zitadel/zitadel/internal/authz/repository/eventsourcing/view"
|
|
"github.com/zitadel/zitadel/internal/crypto"
|
|
"github.com/zitadel/zitadel/internal/database"
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
"github.com/zitadel/zitadel/internal/query"
|
|
)
|
|
|
|
type EsRepository struct {
|
|
authz_es.UserMembershipRepo
|
|
authz_es.TokenVerifierRepo
|
|
}
|
|
|
|
func Start(queries *query.Queries, es *eventstore.Eventstore, dbClient *database.DB, authAlgorithm crypto.AuthAlgorithm, externalSecure bool) (repository.Repository, error) {
|
|
view, err := authz_view.StartView(dbClient, queries)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return &EsRepository{
|
|
authz_es.UserMembershipRepo{
|
|
Queries: queries,
|
|
},
|
|
authz_es.TokenVerifierRepo{
|
|
AuthAlgorithm: authAlgorithm,
|
|
Eventstore: es,
|
|
View: view,
|
|
Query: queries,
|
|
ExternalSecure: externalSecure,
|
|
},
|
|
}, nil
|
|
}
|
|
|
|
func (repo *EsRepository) Health(ctx context.Context) error {
|
|
if err := repo.TokenVerifierRepo.Health(); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|