Conversation
Configuration is in the YAML exposed via the cfg option. The options
available are similarly interpreted as the config in Filebeat with the
options corresponding to the following structs:
type config struct {
Globals map[string]interface{} `yaml:"globals"`
Regexps map[string]string `yaml:"regexp"`
Auth *authConfig `yaml:"auth"`
}
type authConfig struct {
Basic *lib.BasicAuth `yaml:"basic"`
OAuth2 *oAuth2 `yaml:"oauth2"`
}
type oAuth2 struct {
Provider string `yaml:"provider"`
ClientID string `yaml:"client.id"`
ClientSecret *string `yaml:"client.secret"`
EndpointParams url.Values `yaml:"endpoint_params"`
Password string `yaml:"password"`
Scopes []string `yaml:"scopes"`
TokenURL string `yaml:"token_url"`
User string `yaml:"user"`
GoogleCredentialsFile string `yaml:"google.credentials_file"`
GoogleCredentialsJSON string `yaml:"google.credentials_json"`
GoogleJWTFile string `yaml:"google.jwt_file"`
GoogleJWTJSON string `yaml:"google.jwt_json"`
GoogleDelegatedAccount string `yaml:"google.delegated_account"`
AzureTenantID string `yaml:"azure.tenant_id"`
AzureResource string `yaml:"azure.resource"`
}
andrewkroh
approved these changes
May 3, 2023
Member
andrewkroh
left a comment
There was a problem hiding this comment.
Consider adding a test case to check that basic auth is being passed though in requests.
Collaborator
Author
|
That was a little tricky, but done. The OAuth2 case could also be tested, but will require significant additional complexity to be added to the test supports. |
b68a6e4 to
b7cba83
Compare
andrewkroh
approved these changes
May 4, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows use of the configuration options available in the Filebeat input to improve parity for development playground purposes. The implementation is simpler here and does not make use of the go-ucfg package, so there are some differences in config behaviour. Only limited validation of the config is performed.
Configuration is in the YAML exposed via the cfg option. The options available are similarly interpreted as the config in Filebeat with the options corresponding to the following structs:
Please take a look.