{"id":26492787,"url":"https://github.com/jadzeino/auth-cc","last_synced_at":"2026-04-26T08:37:37.975Z","repository":{"id":188527170,"uuid":"678875483","full_name":"jadzeino/auth-cc","owner":"jadzeino","description":"The Auth CC will implement an authorization function by leveraging AWS services. With the power of the AWS CDK, it provides blueprints for building a simple authorization system with DynamoDB, AWS Lambda, and HTTP API Gateway.","archived":false,"fork":false,"pushed_at":"2023-08-15T17:24:44.000Z","size":177,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T09:36:23.405Z","etag":null,"topics":["authentication","authorization","aws"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jadzeino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-15T15:32:05.000Z","updated_at":"2024-09-22T11:32:18.000Z","dependencies_parsed_at":"2023-08-15T19:14:12.096Z","dependency_job_id":null,"html_url":"https://github.com/jadzeino/auth-cc","commit_stats":null,"previous_names":["jadzeino/auth-cc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jadzeino/auth-cc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadzeino%2Fauth-cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadzeino%2Fauth-cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadzeino%2Fauth-cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadzeino%2Fauth-cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jadzeino","download_url":"https://codeload.github.com/jadzeino/auth-cc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadzeino%2Fauth-cc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259466701,"owners_count":22862368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","aws"],"created_at":"2025-03-20T09:27:38.051Z","updated_at":"2026-04-26T08:37:32.946Z","avatar_url":"https://github.com/jadzeino.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auth CC Documentation\n\n## Overview\n\nThe Auth CC will implement an authorization function by leveraging AWS services.\nWith the power of the AWS CDK, it provides blueprints for building a simple\nauthorization system with DynamoDB, AWS Lambda, and HTTP API Gateway.\n\n## Components\n\n- **DynamoDB Table**: A NoSQL database service holding user data.\n- **Lambda Functions**:\n  - **Registration Lambda**: Handles user registration.\n  - **Authentication Lambda**: Authenticates user requests.\n- **HTTP API Gateway**: Provides endpoints for user interaction.\n\n## Deployment to AWS using CDK\n\n### Prerequisites\n\n- Ensure AWS CDK is installed:\n\n```\nnpm install -g aws-cdk\n```\n\n- Bootstrap the CDK App Bootstrap your AWS environment:\n\n```\ncdk bootstrap\n```\n\n- Deploy the Stack Deploy the stack to AWS:\n\n```\ncdk deploy\n```\n\n- Open the AWS CloudFormation in thw aws Console and the stack should be created\n  in your default region\n\n- Cleanup\n\n```\naws-cdk destroy\n```\n\nAfter deploying the script will log the Api endpoint url\n\n## Running Services Locally\n\n- DynamoDB with Docker\n\nStart a local DynamoDB instance:\n\n```\ndocker run -p 8000:8000 amazon/dynamodb-local\n```\n\n- Lambdas with AWS SAM CLI Convert CDK to SAM template:\n\n```\ncdk synth --no-staging \u003e template.yaml\n```\n\n- Start the local API:\n\n```\nsam local start-api\n```\n\n- Access functions at http://127.0.0.1:3000/.\n\n## Testing\n\n### Local Testing\n\nUse tools like Postman or curl.\n\n### Unit Testing\n\n```\nRun: npm test\n```\n\n### Integration Testing\n\n```\nnpm run dynamodb:start\nnpm run create-table\nnpm run test:integration\nnpm run posttest:integration\n```\n\n### Postman Collection\n\nA [collection](./Auth-cc.postman_collection.json) is provided in the repo for\nease of testing.\n\n### Endpoints\n\n`/register`\n\nBody: username: String password: String\n\nExample:\n\n```\n{\n  \"username\": \"JohnDoe\",\n  \"password\": \"Securepassword123!\"\n}\n```\n\n`/auth`\n\nParameters \u0026 Body: username: String password: String\n\nExample:\n\n```\n{\n  \"username\": \"JohnDoe\",\n  \"password\": \"Securepassword123!\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadzeino%2Fauth-cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadzeino%2Fauth-cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadzeino%2Fauth-cc/lists"}