Activités de "rogercprops"

  • ABP Framework version: Commercial v7.2.0
  • UI Type: N/A
  • Database System: MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: N/A
  • Steps to reproduce the issue: N/A

Our solution is built on the Microervice template. We want to create a microservice using MongoDb instead of EF Core for SQL Server. Note this is not for all microservices.

The documentation for changing the database from EF Core to MongoDb is out of date: https://docs.abp.io/en/commercial/7.2/guides/microservice-mongodb

For example: Some of the changes appear to be in the EntityFrameworkCore project and some in the domain project but it's not clear. Making changes in the EntityFrameworkCore project doesn't make sense since it's being replaced by MongDb.

Also, these dont' exist: Remove Migrations folder. Update BookStoreDbMigrationService class to the following: (substitute BookStore with the microservice name)

Since Abp Suite doesn't support selecting the database for the Microservice template I created a project using Abp Suite and the Application template for MongDb. Now I'm trying to translate into the Microservice project structure and am struggling.

Please update the documentation, point me to an accurate solution or tell me I'm mistaken.

Thank you.

Question

I submitted a question 6452.

Mailiming gave us something to try. I asked that the question not be closed because we had not had a chance to test out the solution. Now that we have and it doesn't work we need a different solution.

I don't want this to be charged against our annual support question total since I specifically asked that it not be closed.

Thank you

  • ABP Framework version: v7.2.2
  • UI Type: N/A
  • Database System: EF Core SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: N/A

When an entity in the database is updated through an API call to the repository UpdateAsync method, I would expect it to return the concurrencyStamp that's updated in the database in the response. However it's returning the concurrencyStamp that was sent in the request. It returns the updated lastModificationTime and lastModifierId so I'm not sure why it doesn't return the updated concurrencyStamp

I've only found similar problems to this in Discord and the Abp support questions but no resolution.

Steps to reproduce the issue:

  • Create a new module or application using Abp Suite
  • Create an entity as FullAuditedAggregateRoot. For example Note
  • Add properties to the entity
  • Save the project and generate the code
  • The Dto for the entity should have public string ConcurrencyStamp { get; set; }
  • In the domain service manager (e.g. public class NotesManager : DomainService) the UpdateAsync method should have
note.SetConcurrencyStampIfNotNull(concurrencyStamp);
return await _noteRepository.UpdateAsync(note);
  • Using postman or some other method, call the POST method to add a new entity
  • Using postman or some other method, call the PUT method to update the entity created in the previous step
  • Make note of the concurrencyStamp returned
  • Look in the database table for the entity and note the concurrencyStamp in the table
  • Compare the concurrencyStamp of the PUT request payload and response
  • The concurrency stamps from in the request and response are the same

Here's the PUT request payload: { clientId: "6df04165-acd7-18dd-7ccd-3a0d2bc61b4a" clientName: "Peyton Floris" concurrencyStamp : "dbca526c0d9f4b69b49a4cf992fc0079" text: "Something something" }

Here's the response payload { "clientId": "6df04165-acd7-18dd-7ccd-3a0d2bc61b4a", "clientName": "Peyton Floris", "text": "Something something", "concurrencyStamp": "dbca526c0d9f4b69b49a4cf992fc0079", "isDeleted": false, "deleterId": null, "deletionTime": null, "lastModificationTime": "2024-01-25T11:17:09.740494-06:00", "lastModifierId": "9bb21ac9-d3ac-887e-b521-3a0c9c5d08d6", "creationTime": "2023-11-27T09:40:40.03589", "creatorId": "9bb21ac9-d3ac-887e-b521-3a0c9c5d08d6", "id": "b5a37273-6cfc-3a7f-f4f3-3a0f239d6c90" } Here's the concurrency stamp showing in the database. Please note, I'm the only one hitting this database in test 75aeaf08163242128737360e611e1496

  • ABP Framework version: v7.2.2 Commercial
  • UI Type: N/A
  • Database System: EF Core SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: We're using the microservice template and using the auth-server app for authentication. The auth-server application has been slightly modified for custom branding.

We have a .net API to get a token using the IdentityModel.Client.

When I call the API using Postman that's pointing to the auth-server running on localhost via Tye I'm able to successfully get a token. When I call the API pointing to the auth-server running in Azure Kubernetes I get an invalid username and password error.

The code is the exact same. The database is the same and the credentials are the exact same.

Here's the log from the localhost version: [auth-server_7b8d49a0-6]: [14:31:40 INF] Request starting HTTP/1.1 GET https://localhost:44322/.well-known/openid-configuration - - [auth-server_7b8d49a0-6]: [14:31:40 INF] Request finished HTTP/1.1 GET https://localhost:44322/.well-known/jwks - - - 200 1620 application/json;charset=UTF-8 14.9184ms [auth-server_7b8d49a0-6]: [14:31:40 INF] Request starting HTTP/1.1 POST https://localhost:44322/connect/token application/x-[www-form-urlencoded 357](http://www-form-urlencoded 357) [auth-server_7b8d49a0-6]: [14:31:40 INF] The request URI matched a server endpoint: Token. [auth-server_7b8d49a0-6]: [14:31:40 INF] The token request was successfully extracted: { [auth-server_7b8d49a0-6]: "grant_type": "password", [auth-server_7b8d49a0-6]: "username": "admin", [auth-server_7b8d49a0-6]: "password": "[redacted]", [auth-server_7b8d49a0-6]: "scope": "address email phone profile roles AccountService IdentityService AdministrationService SaasService ClientService ServicesService ClientServiceQueryService UserInfoQueryService DocumentService GuardianshipService NotesService ContactService EngagementLogService DocTemplateService FinancialsService", [auth-server_7b8d49a0-6]: "client_id": "PublicAPI", [auth-server_7b8d49a0-6]: "client_secret": "[redacted]" [auth-server_7b8d49a0-6]: }. [auth-server_7b8d49a0-6]: [14:31:41 INF] The token request was successfully validated. [auth-server_7b8d49a0-6]: [14:31:42 INF] The response was successfully returned as a JSON document: { [auth-server_7b8d49a0-6]: "access_token": "[redacted]", [auth-server_7b8d49a0-6]: "token_type": "Bearer", [auth-server_7b8d49a0-6]: "expires_in": 3600 [auth-server_7b8d49a0-6]: }. [auth-server_7b8d49a0-6]: [14:31:42 INF] Request finished HTTP/1.1 POST https://localhost:44322/connect/token application/x-[www-form-urlencoded 357](http://www-form-urlencoded 357) - 200 1946 application/json;charset=UTF-8 1888.1892ms

Here's the log from the AKS version: [20:18:22 INF] Request starting HTTP/1.1 GET http://authserver.cloverleafcms.dev/.well-known/openid-configuration - - [20:18:22 INF] Request finished HTTP/1.1 GET http://authserver.cloverleafcms.dev/.well-known/openid-configuration - - - 200 2461 application/json;charset=UTF-8 171.3345ms [20:18:22 INF] Request starting HTTP/1.1 GET http://authserver.cloverleafcms.dev/.well-known/jwks - - [20:18:22 INF] The token request was successfully extracted: { "grant_type": "password", "username": "admin", "password": "[redacted]", "scope": "address email phone profile roles AccountService IdentityService AdministrationService SaasService ClientService ServicesService ClientServiceQueryService UserInfoQueryService DocumentService GuardianshipService NotesService ContactService EngagementLogService DocTemplateService FinancialsService", "client_id": "PublicAPI", "client_secret": "[redacted]" }. [20:18:24 INF] The response was successfully returned as a JSON document: { "error": "invalid_grant", "error_description": "Invalid username or password!", "error_uri": "https://documentation.openiddict.com/errors/ID2024" }. [20:18:25 INF] Request finished HTTP/1.1 POST http://authserver.cloverleafcms.dev/connect/token application/x-[www-form-urlencoded 360](http://www-form-urlencoded 360) - 400 155 application/json;charset=UTF-8 3198.2666ms

  • Steps to reproduce the issue:
  1. Create a microservice solution using Abp Suite 7.2.2
  2. Run the solution locally using Tye
  3. Using Postman call the .net API that calls the get token endpoint from the auth-server microservice
  4. Generate a docker images for the auth server application and microservice services and the .net token api.
  5. Deploy the applications to Azure Kubernetes
  6. Change the url for the .net API in postman to the AKS ingress url for .net api

I can give you read access to our GitHub repositories if necessary.

Thank you

  • ABP Framework version: v7.2.2 Commercial
  • UI Type: Vuejs / MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: [18:21:51 INF] Client validation failed because 'https://txguardians.cloverleafcms.de/signin-oidc' was not a valid redirect_uri for CloverleafCMS. [18:21:51 INF] The authorization request was rejected because the redirect_uri was invalid: 'https://txguardians.cloverleafcms.de/signin-oidc'. [18:21:51 INF] Request finished HTTP/1.1 GET http://auth.txguardians.cloverleafcms.dev/connect/authorize?client_id=CloverleafCMS&redirect_uri=https%3A%2F%2Ftxguardians.cloverleafcms.de%2Fsignin-oidc&response_type=code&scope=offline_access+openid+profile+email+phone+AccountService+IdentityService+AdministrationService+SaasService+ClientService+ServicesService+ClientServiceQueryService&state=49e43d931566491a8ec807f6c9a9999b&code_challenge=cunGRYyyMCRmOzS32JF78ZKpWJ33SxHjtyulWlg5MZo&code_challenge_method=S256&response_mode=query - - - 302 0 - 29.5866ms [18:21:51 INF] Request starting HTTP/1.1 GET http://auth.txguardians.cloverleafcms.dev/Error?httpStatusCode=400 - - [18:21:51 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' [18:21:51 INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). [18:21:52 INF] Executing ViewResult, running view ~/Views/Error/Default.cshtml. [18:21:52 INF] Executed ViewResult - view ~/Views/Error/Default.cshtml executed in 65.666ms. [18:21:52 INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 1195.7552ms [18:21:52 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' [
  • Steps to reproduce the issue: We're using the auth-server MVC app in the microservices template. We get the above error when the RedirectUris in the Identity database OpenIdDictApplications table for an application has https://*.cloverleafcms.de.

When I enter the full uri RedirectUris field We don't get the error.

We have the same issue with the CORSOrigins in the application settings/confguration.

We're a SaaS provider and currently have over 80 clients and growing every year. I thought I read a previous post (can't find it) where someone else had the same issue.

How can we use a wildcard to match the custom domains for our clients? (Note about 90% will have something like XXX.cloverleafcms.de).

Thank you

Provide us with the following info:

  • ABP Framework version: v7.2.2 Commercial
  • UI Type: MVC / Vuejs
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: N/A
  • Steps to reproduce the issue: N/A

We're currently using the micro services template with the auth-server as an MVC application.

We're a SaaS provider with dozens of client tenants. Each has either their own domain or a subdomain under our brand domain. For example: auth.mydomain1.com auth.mydomain2.com etc.

What we want to do is have one auth-server application that is mapped to multiple domains and/or subdomains. However in the auth-server application configuration (appsettings) there is only one SelfUrl.

In our vue application we're using the oidc-client.ts NPM module to access the auth-server openiddict. In the oidc-client User Manager settings I can set the redirect url to ${window.location.origin}/signin-oidc, so it's correctly routed back to the Vue application after authentication. I can also specify the authority url to include the client domain auth.${window.location.origin}. In the above examples, if I specify auth.mydomain1.com as the authority, it won't find it since there's only 1 SelfUrl in the appsettings of the auth-server.

How do I have multiple "SelfUrls" based on tenant domain/subdomain in the auth server so I can call it from the Vue application (or any other application for that matter)?

I know one way is to have a different auth server application running for each domain instance but that gets expensive since we have over 80 clients today.

Looking forward to your response. Thank you.

We've developed a solution using the microservices template.

We have 2 services with their own database. We need to create a query using the Abp libraries that joins results from queries from each of the databases.

Use case:

The client microservices manages clients. The programs service manages programs that are assigned to clients.

We want to have one query that gets all of the programs of a given type. We want to have a second query that returns all of the clients associated with those programs.

How do we do that using the microservices template? Has anyone done this before and if so is there a sample we can follow?

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.0 - Commercial
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
    • Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module AuthServer.CprOnAbpAuthServerModule, AuthServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s). UnableToConnect on redis:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 0s ago, last-write: 0s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 0s ago, v: 2.2.4.27433 at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(ConfigurationOptions configuration, TextWriter log) in //src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1163at StackExchange.Redis.ConnectionMultiplexer.Connect(ConfigurationOptions configuration, TextWriter log) in //src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1032 at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1015 at AuthServer.CprOnAbpAuthServerModule.ConfigureServices(ServiceConfigurationContext context) in /src/AuthServerModule.cs:line 141 at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction) at AuthServer.Program.Main(String[] args) in /src/Program.cs:line 27
  • Steps to reproduce the issue:" I've deployed the auth server MVC app, elasticsearch and kibana on Azure Kubernetes using the helm chart templates in the eshopOnAbp demo solution as a guide. All are running in the same AKS cluster.

This is line 141 from AuthserverModule.cs

var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);

This is my auth server deployment.yaml

# Source: authserver/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: authserver
  namespace:  abp-app
spec:
  selector:
    matchLabels:
      app: authserver
  replicas: 1
  template:
    metadata:
      labels:
        app: authserver
    spec:
      containers:
      - name: authserver
        image: cprtestregistry.azurecr.io/authserver:v1.1
        imagePullPolicy: Always
        ports:
        - name: http
          containerPort: 80
        - name: https
          containerPort: 443
        env:
          - name: StringEncryption__DefaultPassPhrase
            value: ert134134t1qqerg
          - name: App__CorsOrigins
            value: https://public-gateway.cloverleafcms.dev,https://web-gateway.cloverleafcms.dev
          - name: App__DisablePII
            value: "true"
          - name: App__RedirectAllowedUrls
            value: https://admin.cloverleafcms.dev,https://admin.cloverleafcms.dev,
          - name: App__SelfUrl
            value: https://auth.cloverleafcms.dev
          - name: AuthServer__Authority
            value: https://auth.cloverleafcms.dev
          - name: AuthServer__RequireHttpsMetadata
            value: "false"
          - name: AuthServer__SwaggerClientId
            value: WebGateway_Swagger
          - name: ConnectionStrings__AdministrationService
            value: Server=***
          - name: ConnectionStrings__IdentityService
            value: Server=***
          - name: ConnectionStrings__SaasService
            value: Server=***
          - name: DOTNET_ENVIRONMENT
            value: Staging
          - name: ElasticSearch__Url
            value: http://elasticsearch
          - name: Redis__Configuration
            value: http://redis

This is my redis service.yaml file:

apiVersion: v1
kind: Service
metadata:
  labels:
    name: redis
  name: redis
spec:
  type: ClusterIP
  ports:
    - name: redis
      port: 6379
  selector:
    app: redis

I've verified that the redis service is running via kubectl get services redis ClusterIP 10.2.92.53

I've also tried using value: redis for the Redis__Configuration env and get this in the pod log: It was not possible to connect to the redis server(s). UnableToConnect on redis:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 0s ago, last-write: 0s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 0s ago, v: 2.2.4.27433 at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(ConfigurationOptions configuration, TextWriter log) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1163

We're using App Commercial and the Microservices template.

We want to build a custom UI with Vue JS as the front end and using the API's in the micro-services on the back end. I'm having a hard time figuring out which services and API(s) to use to login a user to get an access token and the permissions for their roles.

It seems the login from a web app is only through a redirect to the MVC Authentication app. Is that accurate?

If not, can someone guide me?

Thank you.

Affichage de 1 à 9 sur 9 entrées
Made with ❤️ on ABP v8.2.0-preview Updated on mars 25, 2024, 15:11