mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 14:27:30 +00:00
@@ -129,9 +129,14 @@ export const renewAccessToken = async (req: Request, res: Response) => {
|
|||||||
accessTokenTTL,
|
accessTokenTTL,
|
||||||
accessTokenLastRenewedAt,
|
accessTokenLastRenewedAt,
|
||||||
accessTokenMaxTTL,
|
accessTokenMaxTTL,
|
||||||
createdAt: accessTokenCreatedAt
|
createdAt: accessTokenCreatedAt,
|
||||||
|
accessTokenNumUses,
|
||||||
|
accessTokenNumUsesLimit
|
||||||
} = identityAccessToken;
|
} = identityAccessToken;
|
||||||
|
|
||||||
|
if (accessTokenNumUses >= accessTokenNumUsesLimit) {
|
||||||
|
throw BadRequestError({ message: "Unable to renew because access token number of uses limit reached" })
|
||||||
|
}
|
||||||
|
|
||||||
// ttl check
|
// ttl check
|
||||||
if (accessTokenTTL > 0) {
|
if (accessTokenTTL > 0) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ type: application
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.3.2
|
version: 0.3.3
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
ctrl "sigs.k8s.io/controller-runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
const SERVICE_ACCOUNT_ACCESS_KEY = "serviceAccountAccessKey"
|
const SERVICE_ACCOUNT_ACCESS_KEY = "serviceAccountAccessKey"
|
||||||
@@ -159,7 +160,13 @@ func (r *InfisicalSecretReconciler) CreateInfisicalManagedKubeSecret(ctx context
|
|||||||
Data: plainProcessedSecrets,
|
Data: plainProcessedSecrets,
|
||||||
}
|
}
|
||||||
|
|
||||||
err := r.Client.Create(ctx, newKubeSecretInstance)
|
// Set InfisicalSecret instance as the owner and controller
|
||||||
|
err := ctrl.SetControllerReference(&infisicalSecret, newKubeSecretInstance, r.Scheme)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = r.Client.Create(ctx, newKubeSecretInstance)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to create the managed Kubernetes secret : %w", err)
|
return fmt.Errorf("unable to create the managed Kubernetes secret : %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user