Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Use apikey to access elastic search #545

Merged
merged 5 commits into from
Jun 14, 2023
Merged

Use apikey to access elastic search #545

merged 5 commits into from
Jun 14, 2023

Conversation

qgbo
Copy link
Contributor

@qgbo qgbo commented Jun 7, 2023

Add a property (Apikey) in Update ElasticsearchSinkOptions.cs.

You can assign it some vaule.
Then you can access your elasticsearch using the apikey, instead user/password.

In some cases, api key is a more appropriate choice.

You can create the api key, in kibana:
POST /security/api_key { "name": "aaa-apikeys", "role_descriptors": { "abc-shared-application": { "cluster": [ "all" ], "index": [ { "names": [ "abc_share*" ], "privileges": [ "all" ] } ] } } }

then you can get the apikey coded by base64
it like this:
aFlBbDVvY0JOblduWHdpZnNLOUk6cEt2Y01tYVlRQ3FsWlF0MVVjRkN034==

For more detail about apiKey, see: https://www.elastic.co/guide/en/apm/server/7.15/api-key.html

@mivano
Copy link
Contributor

mivano commented Jun 7, 2023

Thanks for the PR. Some minor suggestions if you please.

@qgbo
Copy link
Contributor Author

qgbo commented Jun 8, 2023

changed comment, check please

qgbo added 2 commits June 9, 2023 16:02
@qgbo
Copy link
Contributor Author

qgbo commented Jun 14, 2023

Is any other issue in the PR?

@mivano mivano merged commit 0763a17 into serilog-contrib:dev Jun 14, 2023
@mivano
Copy link
Contributor

mivano commented Jun 14, 2023

No other issue, just slipped my attention. Thanks for the nudge and the PR! I will prepare a release.

@mivano
Copy link
Contributor

mivano commented Jun 14, 2023

@qgbo version 9.0.2 contains this addition. Thanks for the PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants