Skip to content

feat: ✨ add serverside core logic and refresh logic#2

Merged
faizanazim11 merged 4 commits intomasterfrom
1-add-security-package-for-authentication-microservice-and-security-configuration
Sep 18, 2025
Merged

feat: ✨ add serverside core logic and refresh logic#2
faizanazim11 merged 4 commits intomasterfrom
1-add-security-package-for-authentication-microservice-and-security-configuration

Conversation

@faizanazim11
Copy link
Copy Markdown
Contributor

This pull request sets up the foundational developer experience, CI/CD, and documentation for the tp-auth-serverside Python package. It introduces comprehensive instructions and validation scenarios, establishes automated linting and publishing workflows, and configures pre-commit hooks and Python version management. These changes ensure a smooth development process, consistent code quality, and reliable package publishing.

Developer documentation and onboarding:

  • Added a detailed .github/copilot-instructions.md with setup, testing, environment, validation, repository structure, and troubleshooting guidance for both developers and Copilot. This includes manual and automated testing instructions, environment variable requirements, and database support.

Continuous Integration/Continuous Deployment:

  • Introduced .github/workflows/linter.yaml to run linting and formatting checks using Ruff on every pull request, enforcing code quality standards automatically.
  • Added .github/workflows/publish_package.yaml to automate building, publishing to PyPI, and signing releases with Sigstore when a new tag is pushed.

Development environment and tooling:

  • Added .pre-commit-config.yaml to enable pre-commit hooks for whitespace, requirements, and Ruff linting/formatting, ensuring code style consistency before commits.
  • Specified Python version 3.12 in .python-version for consistent local and CI environments.

Copilot AI review requested due to automatic review settings September 18, 2025 18:49
@faizanazim11 faizanazim11 self-assigned this Sep 18, 2025
@faizanazim11 faizanazim11 added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 18, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces the foundational server-side authentication and authorization package tp-auth-serverside for TechPrismatica projects. The implementation provides JWT-based authentication, memory database session storage, token refresh mechanisms, and gRPC services for secure microservice communication.

  • Implements comprehensive JWT utilities with support for both HS256 and RS256 algorithms
  • Adds memory database integration for session token storage and refresh token restrictions
  • Introduces gRPC-based token refresh service for efficient cross-service communication

Reviewed Changes

Copilot reviewed 23 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tp_auth_serverside/utilities/jwt_util.py Core JWT token encoding, decoding, and verification utilities
src/tp_auth_serverside/pb/refresh_pb2_grpc.py Generated gRPC service stubs for token refresh functionality
src/tp_auth_serverside/pb/refresh_pb2.py Generated protocol buffer classes for refresh service
src/tp_auth_serverside/db/memorydb/refresh.py Memory database operations for refresh token restrictions
src/tp_auth_serverside/db/memorydb/login.py Session token storage and retrieval in memory database
src/tp_auth_serverside/db/memorydb/init.py Memory database connector initialization
src/tp_auth_serverside/core/handler/refresh_handler.py gRPC refresh service implementation
src/tp_auth_serverside/core/handler/authentication_handler.py Authentication flow handler for FastAPI integration
src/tp_auth_serverside/core/fastapi_configurer.py FastAPI application configuration and middleware setup
src/tp_auth_serverside/config.py Environment variable configuration and validation
src/tp_auth_serverside/auth/user_specs.py User information schema definition
src/tp_auth_serverside/auth/schemas.py Authentication-related Pydantic schemas
src/tp_auth_serverside/auth/requestor.py HTTP request utility with authentication headers
src/tp_auth_serverside/auth/auth_validator.py JWT token validation and user authentication
src/tp_auth_serverside/init.py Package exports and public API
pyproject.toml Project configuration and dependencies
protos/refresh.proto gRPC service definition for token refresh
README.md Comprehensive documentation and usage examples
.python-version Python version specification
.pre-commit-config.yaml Pre-commit hooks configuration
.github/workflows/publish_package.yaml CI/CD pipeline for package publishing
.github/workflows/linter.yaml Linting workflow configuration
.github/copilot-instructions.md Development and Copilot guidance documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

faizanazim11 and others added 3 commits September 19, 2025 00:20
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@faizanazim11 faizanazim11 merged commit 6ff1289 into master Sep 18, 2025
1 check passed
@faizanazim11
Copy link
Copy Markdown
Contributor Author

Closes #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add security package for authentication microservice and security configuration

2 participants