tnc1997 / samples Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Describe the bug
It looks as though docker compose up --build
is configure to work with Linux/Mac but not Windows.
Current behavior
When trying to run docker compose on Windows w/ Linux containers (after adding certs to the root store as per instructions), the following error occurs:
info: Duende.IdentityServer.Startup[0]
Using the default authentication scheme idsrv for IdentityServer
crit: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
System.UnauthorizedAccessException: Access to the path '/https/localhost.pfx' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
Expected behavior
All services start up as expected
Additional context
I had limited success by using the aspnet dev certs as described here:
https://docs.microsoft.com/en-us/aspnet/core/security/docker-https?view=aspnetcore-6.0
and updating docker-compose to use as follows:
- ASPNETCORE_Kestrel__Certificates__Default__Password=password
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
. . .
volumes:
- ~/.aspnet/https:/https:ro
With this I could get the API and IdS projects to run but not the console app.
Hi there. Love your examples & youtube videos for IdS.
Could you add the .sln files for the various sample please?
E.g. When I just want to open and run the authenticating-a-dotnet-console-application-using-identityserver
for example.
Optionally, if there's a really simple way to accomplish this with Rider, it would be good to call that out.
Describe the bug
A clear and concise description of what the bug is.
Current behavior
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Please add all the required seed data code to the solution e.g. auth clients, so that when you first run the project, the Db will be populated with all the correct data to run the sample. Ideally, the logic would be idempotent also e.g. Add or Update
Example seed structure:
https://github.com/jasontaylordev/CleanArchitecture/blob/main/src/WebUI/Program.cs
https://github.com/jasontaylordev/CleanArchitecture/blob/main/src/Infrastructure/Persistence/ApplicationDbContextSeed.cs
Or what you have here is also fine:
https://github.com/tnc1997/samples/blob/2677309c73284c84d9c3807a9396550d66793b48/authenticating-an-aspnet-core-web-application-using-identityserver/IdentityServer/Program.cs
Describe the bug
In the tutorial "adding-multitenancy-to-an-aspnet-core-6-application" when build as described, on the first call from the browser to one.example.local, I get the following error message in the docker console:
nginx.1 2023/09/26 19:48:54 [error] 134#134: *9 cannot load certificate "data:": PEM_read_bio_X509_AUX() failed (SSL: error:0480006C:PEM routines::no start line:Expecting: TRUSTED CERTIFICATE) while SSL handshaking, client: 172.25.0.1, server: 0.0.0.0:443
nginx.1 2023/09/26 19:48:54 [error] 134#134: *10 cannot load certificate "data:": PEM_read_bio_X509_AUX() failed (SSL: error:0480006C:PEM routines::no start line:Expecting: TRUSTED CERTIFICATE) while SSL handshaking, client: 172.25.0.1, server: 0.0.0.0:443
Expected behavior
We expect to get "Tenant 1" message.
Additional context
Mattias Geniar points out the certificate files may have been swapped:
https://ma.ttias.be/nginx-ssl-certificate-errors-pem_read_bio_x509_aux-pem_read_bio_x509-ssl_ctx_use_privatekey_file/#PEM_read_bio_X509_AUX
Can you assist me on this issue?
If would be great if you could create a solution that combines various functionality of your sample projects into one complete solution.
This would offer an excellent starter project using Duende IdentityServer that goes beyond the basic "hello world" starter templates that currently exist and instead provide an excellent example of a more real-world solution.
A solution structure in the style of:
seems logical. The functionality from your samples that I think would be particular useful are:
I'm also happy to help with some of this if needed!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.