[Move @kbn/config-schema to server] stack_connectors#191864
[Move @kbn/config-schema to server] stack_connectors#191864afharo wants to merge 1 commit intoelastic:mainfrom
@kbn/config-schema to server] stack_connectors#191864Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
|
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
|
Pinging @elastic/appex-ai-infra (Team:AI Infra) |
| export type SecretsConfigurationType = TypeOf<typeof SecretConfigurationSchema>; | ||
| export type CAType = TypeOf<typeof AuthConfiguration.ca>; | ||
| export type VerificationModeType = TypeOf<typeof AuthConfiguration.verificationMode>; | ||
| export type { |
There was a problem hiding this comment.
Reexporting the types from common to avoid more changes in other parts of the code.
| }); | ||
|
|
||
| export const SecretConfigurationSchemaValidation = { | ||
| validate: (secrets: any) => { |
There was a problem hiding this comment.
any is flagged as an error in the server but not in common 😅
So I chose to remove it instead of skipping it.
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: |
| SecretConfigurationSchemaValidation | ||
| ); | ||
|
|
||
| export type HasAuth = TypeOf<typeof hasAuthSchema>; |
There was a problem hiding this comment.
Could you please preserve the initial file structure and keep these in a separate auth/types.ts? 🙏
There was a problem hiding this comment.
ACK! I'm not sure if that'll defeat the purpose since the types are based on a runtime object. I'll play around with this to see if there's a more elegant way :)
tomsonpl
left a comment
There was a problem hiding this comment.
Defend workflows - LGTM 🚀
|
Will leave review up to @elastic/security-generative-ai and @elastic/appex-ai-infra, don't want to approve for them (which IIUC will happen if I approve on behalf of |
Pull request was converted to draft
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
Summary
Part of #189476.
We want to avoid
@kbn/config-schemafrom leaking to the browser, and this plugin is using it outside the./serverdirectory.I found that the UI only references this code via
import type, so I don't expect it to have any impact on bundle metrics, but this PR is still useful to avoid potential future leaks.For maintainers