Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add hec token validation #876

Closed

Conversation

kdoroszko-splunk
Copy link
Contributor

@kdoroszko-splunk kdoroszko-splunk commented Aug 7, 2024

This PR adds validation of HEC token. It just checks if an event can be send via given HEC token to external Splunk.
Fix was tested locally. The result for 3 workers are presented in the attached screenshot (with pytest-splunk-addon code from develop branch it breaks main worker , restarts it and wait indefinitely).
Although splunk_external fixture is defined in the session scope it runs on each worker separately.
The following question arises: is it expected behaviour, or it's something we'd like to change (for the fixture logic to be executed before pytest splits for several processes). I do not believe that we have to check if Splunk is responsive from each worker separately. That would need to be explored (such solution might not be compatible with pytest):
image

harshilgajera-crest and others added 26 commits May 16, 2024 11:36
Added all the values for record_type field as per [IANA
website](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml)
for network resolution data model.
# [5.3.0-beta.1](v5.2.6...v5.3.0-beta.1) (2024-05-16)

### Features

* updating network resolution data model ([#840](#840)) ([b851bb9](b851bb9))
Updated 2  fields in Network Resolution model.

- Added expected values for reply_code_id which has corresponding
reply_code.
- Added expected values for reply_code.
# [5.3.0-beta.2](v5.3.0-beta.1...v5.3.0-beta.2) (2024-05-27)

### Features

* updating network resolution model ([#844](#844)) ([3859725](3859725))
When tests are ran with multiple workers, duplicate logging is observed
because every workers logs the warning.
This PR fixes that.

---------

Co-authored-by: Artem Rys <rysartem@gmail.com>
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/splunk/pytest-splunk-addon).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
# [5.3.0-beta.3](v5.3.0-beta.2...v5.3.0-beta.3) (2024-06-03)

### Bug Fixes

* do not log .conf parser warnings from all workers ([#845](#845)) ([8d4fb44](8d4fb44))
* updating src and dest fields ([#846](#846)) ([a143c49](a143c49))
)

- Removed docker-compose-ci.yaml and pytest-ci.yaml
- Updated docker-compose.yaml  and pytest.ini with required changes
- Now docker-compose.yaml and pytest.ini can be used in ci and local as
well
# [5.3.0-beta.4](v5.3.0-beta.3...v5.3.0-beta.4) (2024-06-26)

### Features

* updating cim model definitions ([#856](#856)) ([1157ab9](1157ab9))
Moved modules from standard_lib folder to its parent folder
Kept addon_basic.py in standard_lib folder for backward compatibility.
# [5.3.0-beta.5](v5.3.0-beta.4...v5.3.0-beta.5) (2024-07-01)

### Features

* schema changes for LR notes ([#857](#857)) ([89fd96e](89fd96e))
Added support for cim v5.3.2.

- Updated data-models with new child data set in various models.
- Updated required fields with updated values as per v5.3.2.
- Added optional fields as per v5.3.2

Detailed comparison and analysis between v4.15.0 and v5.3.2 can be found
here:
https://docs.google.com/spreadsheets/d/1ZFDC0Efn-bHvcU1Qy78s95GCfWyxt6IUhTv94j3yagk/edit#gid=1147250948
# [5.3.0-beta.6](v5.3.0-beta.5...v5.3.0-beta.6) (2024-07-01)

### Features

* add support for CIM v5.3.2 ([#853](#853)) ([5e7d1e8](5e7d1e8))
# [5.3.0-beta.7](v5.3.0-beta.6...v5.3.0-beta.7) (2024-07-03)

### Features

* schema changes for LR notes ([#862](#862)) ([168b915](168b915))
Updated **url** rule so that if only url["path"] or url["query"] is
given, just path and query is generated.
EG: url["path"] will generate path like: "/random/path"
EG: url["query"] will generate query like: "?asd=abs"
# [5.3.0-beta.8](v5.3.0-beta.7...v5.3.0-beta.8) (2024-07-10)

### Bug Fixes

* updating url rule ([#864](#864)) ([a00fc81](a00fc81))
Added new data models:

- Compute_Inventory
- Data_Access
- Databases
- Event_Signatures
- Interprocess Messaging
- JVM
- Performance
- Ticket_Management

Updated version in requirement_test_datamodel_tag_constants.py file
# [5.3.0-beta.9](v5.3.0-beta.8...v5.3.0-beta.9) (2024-07-11)

### Features

* adding new data models ([#863](#863)) ([91fd95d](91fd95d))
Added support for CLEAN_KEYS in Transforms.conf.
Added respective e2e test case for the same

Impact on Addons:

Now if Addons have have field names in transforms report which have
non-alphanumeric chars then those chars would be first converted to _
and then tests would be generated as by default in splunk CLEAN_KEYS is
set to true, so splunk also does the same thing.

Moreover if any report stanza has explicitly set CLEAN_KEYS=false then
for those reports field conversion would not happen and tests would be
generated as it is.
# [5.3.0-beta.10](v5.3.0-beta.9...v5.3.0-beta.10) (2024-07-24)

### Features

* adding CLEAN_KEYS support ([#869](#869)) ([b2f6dc5](b2f6dc5))
@kdoroszko-splunk kdoroszko-splunk marked this pull request as ready for review August 7, 2024 10:12
@kdoroszko-splunk kdoroszko-splunk requested a review from a team as a code owner August 7, 2024 10:12
@kdoroszko-splunk kdoroszko-splunk changed the base branch from develop to ci/feature-release August 7, 2024 12:12
@kdoroszko-splunk kdoroszko-splunk requested a review from a team as a code owner August 7, 2024 12:12
@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2024
@kdoroszko-splunk
Copy link
Contributor Author

moved to: #877

@kdoroszko-splunk kdoroszko-splunk deleted the fix/add-hec-token-validation branch August 7, 2024 12:24
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.

6 participants