-
Notifications
You must be signed in to change notification settings - Fork 1
Add Entra ID Authentication Support for Redis ( go-redis
)
#1
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
Merged
Changes from 23 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
e62008e
Initial Setup - Core Files
ndyakov 9b0b345
Initial Setup - Configuration Files
ndyakov bdc94c8
Core Interfaces
ndyakov 6c1490b
Testing Infrastructure - Core Setup
ndyakov 49585a7
Identity Provider - Core Interface
ndyakov 62ee78b
Identity Provider - Default Implementation
ndyakov 9219edc
Token Management - Core Interface
ndyakov d5d0aa8
Token Management - Implementation
ndyakov c846eb0
Token Listener Implementation
ndyakov d7b60dd
Credentials Provider - Core Interface
ndyakov 02f9fe1
Configuration - Core Options
ndyakov e6ee88d
Version Management - Core
ndyakov 8dd60ed
CI/CD - GitHub Actions
ndyakov 49dd82c
CI/CD - Git Hooks
ndyakov 72bd3d7
Documentation - README
ndyakov 52a8be5
Documentation - Contributing Guide
ndyakov 02d53c9
Version Management - Tests
ndyakov 3bf1fa9
Identity Provider Tests
ndyakov e0d0879
Token Listener Tests
ndyakov 305fcaf
Fix flaky test
ndyakov bf65058
improve credentials provider
ndyakov 43a2779
add more tests
ndyakov e05c56c
refactor tests
ndyakov 89b83e6
improve answer in readme
ndyakov 9d087bc
export shared types
ndyakov 217097d
Address PR comments related to token tests
ndyakov 87f7d84
add deadlock test
ndyakov 2a286c6
Address PR comments, refactor
ndyakov 07ab789
Update documentation and RetryOptions
ndyakov 7ad6674
close the context when token manager is stopped
ndyakov 2631968
update go.mod go.sum
ndyakov 1fca220
Update identity/confidential_identity_provider.go
ndyakov 22dc6ae
Change IdentityProviderResponse interface
ndyakov 15c4d5d
Update Readme.md
ndyakov f493bda
refactor(response)!: getters will return err
ndyakov aba78bf
chore(comments): Updated some comments
ndyakov 76cefcc
fix(manager): requestTimeout and parser
ndyakov 3b9fcb7
refactor(manager)!: remove Stop method
ndyakov 57e500d
refactor(tokenparser): simplify default parser
ndyakov 7755fb9
test(parser): add additional tests for bad token
ndyakov 676cf1c
fix(manager): starting and stopping the manager
ndyakov 41af0a7
fix(manager): wip, still have tests to resolve
ndyakov 7e3317a
fix(tests): fix manager tests
ndyakov 5a37c4b
fix(tests): 100% coverage for token package
ndyakov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
goimports -l -w . # includes go fmt | ||
golangci-lint run # includes golint, go vet |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Benchmark Performance | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
# deployments permission to deploy GitHub pages website | ||
deployments: write | ||
# contents permission to update benchmark contents in gh-pages branch | ||
contents: write | ||
|
||
jobs: | ||
benchmark: | ||
name: Performance regression check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "stable" | ||
- name: Install dependencies | ||
run: go mod tidy | ||
- name: Run benchmark | ||
run: go test ./... -bench=. -benchmem -count 2 -timeout 1m | tee benchmarks.txt | ||
# Download previous benchmark result from cache (if exists) | ||
- name: Download previous benchmark data | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./cache | ||
key: ${{ runner.os }}-benchmark | ||
# Run `github-action-benchmark` action | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: Go Benchmark | ||
tool: 'go' | ||
output-file-path: benchmarks.txt | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
auto-push: true | ||
# Show alert with commit comment on detecting possible performance regression | ||
alert-threshold: '200%' | ||
comment-on-alert: true | ||
fail-on-alert: true | ||
alert-comment-cc-users: '@ndyakov' | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,8 @@ | |
*.tar.gz | ||
*.dic | ||
coverage.txt | ||
cover.out | ||
**/coverage.txt | ||
**/cover.out | ||
.vscode | ||
tmp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: "2" | ||
linters: | ||
disable: | ||
- depguard | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Contributing to go-redis-entraid | ||
|
||
We welcome contributions from the community! If you'd like to contribute to this project, please follow these guidelines: | ||
|
||
## Getting Started | ||
|
||
1. Fork the repository | ||
2. Create a new branch for your feature or bugfix | ||
3. Make your changes | ||
4. Run the tests and ensure they pass | ||
5. Submit a pull request | ||
|
||
## Development Setup | ||
|
||
```bash | ||
# Clone your fork | ||
git clone https://github.com/your-username/go-redis-entraid.git | ||
cd go-redis-entraid | ||
|
||
# Install dependencies | ||
go mod download | ||
|
||
# Run tests | ||
go test ./... | ||
``` | ||
|
||
## Code Style and Standards | ||
|
||
- Follow the Go standard formatting (`go fmt`) | ||
- Write clear and concise commit messages | ||
- Include tests for new features | ||
- Update documentation as needed | ||
- Follow the existing code style and patterns | ||
|
||
## Testing | ||
|
||
We maintain high test coverage for the project. When contributing: | ||
|
||
- Add tests for new features | ||
- Ensure existing tests pass | ||
- Run the test coverage tool: | ||
```bash | ||
go test -coverprofile=cover.out ./... | ||
go tool cover -html=cover.out | ||
``` | ||
|
||
## Pull Request Process | ||
|
||
1. Ensure your code passes all tests | ||
2. Update the README.md if necessary | ||
3. Submit your pull request with a clear description of the changes | ||
|
||
## Reporting Issues | ||
|
||
If you find a bug or have a feature request: | ||
|
||
1. Check the existing issues to avoid duplicates | ||
2. Create a new issue with: | ||
- A clear title and description | ||
- Steps to reproduce (for bugs) | ||
- Expected and actual behavior | ||
- Environment details (Go version, OS, etc.) | ||
|
||
## Development Workflow | ||
|
||
1. Create a new branch for your feature/fix: | ||
```bash | ||
git checkout -b feature/your-feature-name | ||
``` | ||
|
||
2. Make your changes and commit them: | ||
```bash | ||
git add . | ||
git commit -m "Description of your changes" | ||
``` | ||
|
||
3. Push your changes to your fork: | ||
```bash | ||
git push origin feature/your-feature-name | ||
``` | ||
|
||
4. Create a pull request from your fork to the main repository | ||
|
||
## Review Process | ||
|
||
- All pull requests will be reviewed by maintainers | ||
- Be prepared to make changes based on feedback | ||
- Ensure your code meets the project's standards | ||
- Address any CI/CD failures | ||
|
||
## Documentation | ||
|
||
- Update relevant documentation when making changes | ||
- Include examples for new features | ||
- Update the README if necessary | ||
- Add comments to complex code sections | ||
|
||
## Questions? | ||
|
||
If you have any questions about contributing, please: | ||
1. Check the existing documentation | ||
2. Look through existing issues | ||
3. Create a new issue if your question hasn't been answered |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.