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

Implement user management (create, list, get) via API #3024

Merged
merged 23 commits into from Feb 6, 2024

Conversation

lo-chr
Copy link
Contributor

@lo-chr lo-chr commented Jan 21, 2024

This PR fixes most of the features, mentioned here: #3023

This PR is a first step into further capabilities of user management via API, although it lacks the ability to manage a particular user itself.

I also added some features to the testing framework, enabling the test of "admin only" tests, via creating admin users during test setup.

Checks

  • All tests succeed -> there are some warnings in the Sigma Tests, which I did not touch. My added tests did succeed.
  • Unit tests added.

Closing issues
closes #3023

@lo-chr lo-chr marked this pull request as draft January 21, 2024 21:57
@lo-chr

This comment was marked as resolved.

@lo-chr
Copy link
Contributor Author

lo-chr commented Jan 21, 2024

I changed the UserResource, so that it does not check for admin privileges anymore.

Might be useful to limit details like mail address to admin users In the future.

@lo-chr lo-chr marked this pull request as ready for review January 21, 2024 22:38
@berggren berggren self-requested a review January 24, 2024 14:10
@berggren
Copy link
Contributor

Hi @lo-chr thanks for contributing! I'll review this on Friday, Jan 26.

api_client/python/timesketch_api_client/client.py Outdated Show resolved Hide resolved
api_client/python/timesketch_api_client/client.py Outdated Show resolved Hide resolved
api_client/python/timesketch_api_client/client.py Outdated Show resolved Hide resolved
timesketch/api/v1/resources/user.py Outdated Show resolved Hide resolved
@jkppr jkppr added this to the Release: 20240207 milestone Feb 1, 2024
@lo-chr
Copy link
Contributor Author

lo-chr commented Feb 1, 2024

I'll fix this over the weekend! Thank you for the review.

@lo-chr lo-chr requested a review from berggren February 3, 2024 17:12
@lo-chr lo-chr removed their assignment Feb 3, 2024
Copy link
Contributor

@berggren berggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

timesketch/api/v1/resources/user.py Outdated Show resolved Hide resolved
timesketch/api/v1/resources/user.py Outdated Show resolved Hide resolved
timesketch/api/v1/resources/user.py Outdated Show resolved Hide resolved
@lo-chr lo-chr requested a review from berggren February 6, 2024 09:28
Copy link
Contributor

@berggren berggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@berggren
Copy link
Contributor

berggren commented Feb 6, 2024

Thanks for contributing!

@lo-chr
Copy link
Contributor Author

lo-chr commented Feb 6, 2024

Thank your for the reviews and advice. I learned one or two things. ☺️

@berggren berggren merged commit 92b92e2 into google:master Feb 6, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Surface user management via API client
3 participants