{"id":20048468,"url":"https://github.com/aggstam/azure-design-patterns","last_synced_at":"2025-03-02T08:21:17.304Z","repository":{"id":46265727,"uuid":"282628102","full_name":"aggstam/azure-design-patterns","owner":"aggstam","description":"This project compines Gatekeeper, Valet Key and Static Content Hosting patterns using Azure Storage emulator.","archived":false,"fork":false,"pushed_at":"2023-01-31T16:32:45.000Z","size":8596,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-12T20:33:33.882Z","etag":null,"topics":["azure","csharp","gatekeeper"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aggstam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-26T10:39:33.000Z","updated_at":"2022-11-05T13:00:56.000Z","dependencies_parsed_at":"2023-02-16T21:15:39.313Z","dependency_job_id":null,"html_url":"https://github.com/aggstam/azure-design-patterns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fazure-design-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fazure-design-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fazure-design-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aggstam%2Fazure-design-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aggstam","download_url":"https://codeload.github.com/aggstam/azure-design-patterns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241478046,"owners_count":19969212,"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":["azure","csharp","gatekeeper"],"created_at":"2024-11-13T11:44:13.132Z","updated_at":"2025-03-02T08:21:17.274Z","avatar_url":"https://github.com/aggstam.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# azure-design-patterns\nThis project compines Gatekeeper, Valet Key and Static Content Hosting patterns using Azure Storage emulator.\n\nThe basic functionality of the project is to provide remote storage actions for a picture repository site, along with user database and share links for the images.\n\nTwo REST APIs exist, one for the Gatekeeper(Gateway) and one for the Backend.\n\u003cbr\u003e\nGatekeeper API exposes the public URLs of the application, performs requests validation and forward each valid request to Backend to be processed.\n\u003cbr\u003e\nBackEnd API execute request processing and have access to Database for user authentication/creation and Azure Storage for file actions.\n\n## Prerequisites\n- ASP.NET Core(C#) v3.1\n- MongoDB v4.2.8\n- Microsoft Azure Storage Emulator v5.10\n\nPlace `secrets.json` under UserSercrets folder:\n```\nC:\\Users\\\u003cuser\u003e\\AppData\\Roaming\\Microsoft\\UserSecrets\\\u003capp_id\u003e\n```\n\nInitialize MongoDB with project data folder:\n```\n% mongod --dbpath \u003cpath_to_folder\u003e\\azure-design-patterns\\BackEnd\\database\\UsersData\n```\n\nTo generate users execute the following commands in MongoDB:\n```\ndb.Users.insertMany(\n    [\n        {'FirstName':'','LastName':'','Email':'','Username':'gatekeeper','Password':'gatekeeper'},\n        {'FirstName':'Aggelos','LastName':'Stamatiou','Email':'aggelos@gmail.com','Username':'aggelos','Password':'aggelos'},\n        {'FirstName':'Giorgos','LastName':'Weider','Email':'giorgos@gmail.com','Username':'giorgos','Password':'giorgos'},\n        {'FirstName':'Stavros','LastName':'Laios','Email':'stavros@gmail.com','Username':'stavros','Password':'stavros'}\n    ]\n)\n```\n\n## Runtime notes\n- Local GateKeeper url: https://localhost:44373/gatekeeper/\n- Local BackEnd url: https://localhost:44373/gatekeeper/\n- Local Azure Storage Emulator url: http://localhost:10000/devstoreaccount1/static-content/\n\nBoth GateKeeper and BackEnd use HTTPS.\n\u003cbr\u003e\nGateKeeper endpoints are public, while BackEnd are accessible only in local network.\n\u003cbr\u003e\nBase Authentication is used on GateKeeper for User Authentication.\n\u003cbr\u003e\nWhen a Gatekeeper service is requested:\n1. An authorization call to BackEnd is executed in order to verify user.\n2. If user is authorized, service is executed.\n\nMongoDB is used to store Users information.\n\u003cbr\u003e\nAzure local storage is used for content hosting.\n\u003cbr\u003e\nValet Keys are used in order to retrieve content from Azure local storage.\n\u003cbr\u003e\nWhen a BackEnd service fails, HTTP status 500 is returned to GateKeeper.\n\u003cbr\u003e\nYou can find requests execution examples in `requests_examples.txt`.\n\t\t\t\t \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faggstam%2Fazure-design-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faggstam%2Fazure-design-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faggstam%2Fazure-design-patterns/lists"}