You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prepare the Security domain HTTP APIs for Serverless (elastic#162087)
Closeselastic#161337
## Summary
Uses build flavor(see elastic#161930) to disable specific Kibana security,
spaces, and encrypted saved objects HTTP API routes in serverless (see
details in elastic#161337). HTTP APIs that will be public in serverless have
been handled in elastic#162523.
**IMPORTANT: This PR leaves login, user, and role routes enabled. The
primary reason for this is due to several testing mechanisms that rely
on basic authentication and custom roles (UI, Cypress). These tests will
be modified to use SAML authentication and serverless roles in the
immediate future. Once this occurs, we will disable these routes.**
### Testing
This PR also implements testing API access in serverless.
- The testing strategy for disabled routes in serverless is to verify a
`404 not found `response.
- The testing strategy for internal access routes in serverless is to
verify that without the internal request header
(`x-elastic-internal-origin`), a `400 bad request response` is received,
then verify that with the internal request header, a `200 ok response`
is received.
- The strategy for public routes in serverless is to verify a `200 ok`
or `203 redirect` is received.
~~blocked by elastic#161930~~
~~blocked by elastic#162149 for test implementation~~
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
@@ -123,6 +132,8 @@ export function defineCommonRoutes({
123
132
returnundefined;
124
133
}
125
134
135
+
// Register the login route for serverless for the time being. Note: This route will move into the buildFlavor !== 'serverless' block below. See next line.
136
+
// ToDo: In the serverless environment, we do not support API login - the only valid authentication methodology (or maybe just method or mechanism?) is SAML
126
137
router.post(
127
138
{
128
139
path: '/internal/security/login',
@@ -169,20 +180,23 @@ export function defineCommonRoutes({
0 commit comments