Skip to content

Commit

Permalink
Add check of UseBuiltinDomain flag
Browse files Browse the repository at this point in the history
  • Loading branch information
molotkov-and committed Jan 24, 2024
1 parent ba1fea3 commit a3a803a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ydb/core/protos/auth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ message TAuthConfig {
optional string LdapAuthenticationDomain = 75 [default = "ldap"];
optional bool UseAccessServiceApiKey = 76 [default = false]; // Use IAM ApiKey
optional string AsSignatureExpireTime = 77 [default = "1m"];
optional bool UseBuiltinDomain = 78 [default = false];
}

message TUserRegistryConfig {
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/security/ticket_parser_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class TTicketParserImpl : public TActorBootstrapped<TDerived> {

template <typename TTokenRecord>
bool CanInitBuiltinToken(const TString& key, TTokenRecord& record) {
if (record.TokenType == TDerived::ETokenType::Unknown || record.TokenType == TDerived::ETokenType::Builtin) {
if (Config.GetUseBuiltinDomain() && (record.TokenType == TDerived::ETokenType::Unknown || record.TokenType == TDerived::ETokenType::Builtin)) {
if(record.Ticket.EndsWith("@" BUILTIN_ACL_DOMAIN)) {
record.TokenType = TDerived::ETokenType::Builtin;
SetToken(key, record, new NACLib::TUserToken({
Expand Down

0 comments on commit a3a803a

Please sign in to comment.