Skip to content

Commit

Permalink
Merge upstream changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Aug 22, 2023
1 parent 46fceda commit da74429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class HTTPAuthenticationProvider extends BaseAuthenticationProvider {
// Log a portion of the JWT signature to make debugging easier.
const jwtExcerpt = authorizationHeader.credentials.slice(-10);
this.logger.error(
`Attempted to authenticate with JWT credentials (${jwtExcerpt}) against ${request.url.pathname}${request.url.search}, but it's not allowed. ` +
`Attempted to authenticate with JWT credentials (${jwtExcerpt}) against ${request.url.pathname}${request.url.search}, but it's not allowed. ` +
`Ensure that the route is defined with the "${ROUTE_TAG_ACCEPT_JWT}" tag.`
);
return AuthenticationResult.notHandled();
Expand Down
9 changes: 3 additions & 6 deletions x-pack/plugins/security/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,11 @@ export const ConfigSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
autoSchemesEnabled: schema.boolean({ defaultValue: true }),
schemes: schema.arrayOf(schema.string(), { defaultValue: ['apikey', 'bearer'] }),
jwt: schema.conditional(
schema.contextRef('serverless'),
true,
schema.object({
jwt: offeringBasedSchema({
serverless: schema.object({
taggedRoutesOnly: schema.boolean({ defaultValue: true }),
}),
schema.never()
),
}),
}),
}),
audit: schema.object({
Expand Down

0 comments on commit da74429

Please sign in to comment.