Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aggstam/azure-design-patterns
This project compines Gatekeeper, Valet Key and Static Content Hosting patterns using Azure Storage emulator.
https://github.com/aggstam/azure-design-patterns
azure csharp gatekeeper
Last synced: about 2 months ago
JSON representation
This project compines Gatekeeper, Valet Key and Static Content Hosting patterns using Azure Storage emulator.
- Host: GitHub
- URL: https://github.com/aggstam/azure-design-patterns
- Owner: aggstam
- License: apache-2.0
- Created: 2020-07-26T10:39:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T16:32:45.000Z (almost 2 years ago)
- Last Synced: 2024-05-21T01:42:48.641Z (8 months ago)
- Topics: azure, csharp, gatekeeper
- Language: C#
- Homepage:
- Size: 8.2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# azure-design-patterns
This project compines Gatekeeper, Valet Key and Static Content Hosting patterns using Azure Storage emulator.The 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.
Two REST APIs exist, one for the Gatekeeper(Gateway) and one for the Backend.
Gatekeeper API exposes the public URLs of the application, performs requests validation and forward each valid request to Backend to be processed.
BackEnd API execute request processing and have access to Database for user authentication/creation and Azure Storage for file actions.## Prerequisites
- ASP.NET Core(C#) v3.1
- MongoDB v4.2.8
- Microsoft Azure Storage Emulator v5.10Place `secrets.json` under UserSercrets folder:
```
C:\Users\\AppData\Roaming\Microsoft\UserSecrets\
```Initialize MongoDB with project data folder:
```
% mongod --dbpath \azure-design-patterns\BackEnd\database\UsersData
```To generate users execute the following commands in MongoDB:
```
db.Users.insertMany(
[
{'FirstName':'','LastName':'','Email':'','Username':'gatekeeper','Password':'gatekeeper'},
{'FirstName':'Aggelos','LastName':'Stamatiou','Email':'[email protected]','Username':'aggelos','Password':'aggelos'},
{'FirstName':'Giorgos','LastName':'Weider','Email':'[email protected]','Username':'giorgos','Password':'giorgos'},
{'FirstName':'Stavros','LastName':'Laios','Email':'[email protected]','Username':'stavros','Password':'stavros'}
]
)
```## Runtime notes
- Local GateKeeper url: https://localhost:44373/gatekeeper/
- Local BackEnd url: https://localhost:44373/gatekeeper/
- Local Azure Storage Emulator url: http://localhost:10000/devstoreaccount1/static-content/Both GateKeeper and BackEnd use HTTPS.
GateKeeper endpoints are public, while BackEnd are accessible only in local network.
Base Authentication is used on GateKeeper for User Authentication.
When a Gatekeeper service is requested:
1. An authorization call to BackEnd is executed in order to verify user.
2. If user is authorized, service is executed.MongoDB is used to store Users information.
Azure local storage is used for content hosting.
Valet Keys are used in order to retrieve content from Azure local storage.
When a BackEnd service fails, HTTP status 500 is returned to GateKeeper.
You can find requests execution examples in `requests_examples.txt`.