Giter VIP home page Giter VIP logo

samples's People

Contributors

dependabot[bot] avatar tnc1997 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

samples's Issues

Unable to run docker compose up

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.

Add the .sln files for sample projects

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.

Trusting a self-signed certificate on Linux

Describe the bug
A clear and concise description of what the bug is.

Current behavior
Steps to reproduce the behavior:

  1. Step 1: Generate a self-signed certificate was successful
  2. Step 2: Import the self-signed certificate. was not work!

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context
Add any other context about the problem here.

Add identity Db seed data to solution

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

The two ssl files appear to be swapped

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?

Create a combined sample solution example

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:

  • API - w/ authorization code & refresh token
  • Console - w/ client credentials
  • SPA - w/ authorization code & refresh token
  • IdentityServer

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.