Tried this in Host Api >> HttpApiHostModule but dint worked. I am able to login in two browser with same user.
It worked but facing differet issue now. We have multiple identity-service instances are running in 2 servers and we are load balancing it behind NLB. The issue is the 1st request goes to Identity server1 and if the second goes server2, it fails saying 401-unauthorized because the server 1 could not able to share the token with server2. we are not using Radis cache and Key. What I have to do to make load balancing working here ? Is anything can be done for shared resources between two Identity server instance?
After enabling https for identity server still discovery shows http. we are using cloudfront --> nlb --> ECS
Also, try given solution on this but didnt worked
var forwardOptions = new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto, RequireHeaderSymmetry = false };
forwardOptions.KnownNetworks.Clear(); forwardOptions.KnownProxies.Clear();
// ref: https://github.com/aspnet/Docs/issues/2384 app.UseForwardedHeaders(forwardOptions);
https://github.com/IdentityServer/IdentityServer4/issues/1331
We are looking for swagger definition of identity server API . Examples are given below. Can we generate swagger definition in ABP.io Identity Server Seperated approch ?
http://MyidentityServer/.well-known/openid-configuration "issuer":"http://MyidentityServer", "jwks_uri":"http://MyidentityServer/.well-known/openid-configuration/jwks", "authorization_endpoint":"http://MyidentityServer/connect/authorize", "token_endpoint":"http://MyidentityServer/connect/token", "userinfo_endpoint":"http://MyidentityServer/connect/userinfo", "end_session_endpoint":"http://MyidentityServer/connect/endsession", "check_session_iframe":"http://MyidentityServer/connect/checksession", "revocation_endpoint":"http://MyidentityServer/connect/revocation", "introspection_endpoint":"http://MyidentityServer/connect/introspect", "device_authorization_endpoint":"http://MyidentityServer/connect/deviceauthorization",
If I specify the order in routes and not patching it againg getting that error as above image
const newHomeRouteShowConfig: Partial<ABP.Route> = { invisible: false, requiredPolicy: 'Admin', order: 0 };
const newHomeRouteHideConfig: Partial<ABP.Route> = { invisible: true, requiredPolicy: 'Admin', order: 0 };
this.routes.patch('Entities', newHomeRouteShowConfig); this.routes.patch('Banks', newHomeRouteShowConfig); this.routes.patch('Suppliers', newHomeRouteShowConfig); this.routes.patch('Program', newHomeRouteHideConfig);
this patch code is added to app.component.ts
If I specify the order 0 while pattch the menu is arrangeing the order of excuting the code
but in mozilla it showing different order in other browsers it showing differnt order.
1)app-routing.module.ts
const routes: Routes = [ { path: 'anchor-admin-dashboard', component: ApplicationLayoutComponent, loadChildren: () => import('./dashboard1/dashboard1.module').then((m) => m.Dashboard1Module), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: '::Menu:Dashboard', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order:1, } as ABP.Route, }, }, { path: 'suppliers', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-supplier/manage-supplier.module').then((m) => m.ManageSupplierModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Suppliers', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order: 2, } as ABP.Route, }, }, { path: 'banks', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-bank/manage-bank.module').then((m) => m.ManageBankModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Banks', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order: 3, } as ABP.Route, }, }, { path: 'entities', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-entity/manage-entity.module').then((m) => m.ManageEntityModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Entities', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order:4, } as ABP.Route, }, }, { path: 'program', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-program/manage-program.module').then(m => m.ManageProgramModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Program', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin' } as ABP.Route, } }
@NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule], })
]
2)component code & app.component.ts
const newHomeRouteShowConfig: Partial<ABP.Route> = { invisible: false, requiredPolicy: 'Admin', order: 0 };
const newHomeRouteHideConfig: Partial<ABP.Route> = {
invisible: true,
requiredPolicy: 'Admin',
order: 0
};
if ((currentmodule === null) || (currentmodule === false)) {
this.routes.patch('Suppliers', newHomeRouteShowConfig);
this.routes.patch('Entities', newHomeRouteShowConfig);
this.routes.patch('Banks', newHomeRouteShowConfig);
this.routes.patch('Program', newHomeRouteHideConfig);
} else {
this.routes.patch('Suppliers', newHomeRouteHideConfig);
this.routes.patch('Entities', newHomeRouteHideConfig);
this.routes.patch('Banks', newHomeRouteHideConfig);
this.routes.patch('Program', newHomeRouteShowConfig);
}
I am upgarding my angular App from ABP 2.7.0 to ABP 3.0.4. Some how i manged to build the Anguar app with below package.json
{ "name": "MyApp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --open", "build": "ng build", "build:prod": "ng build --configuration production", "test": "jest", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "jest": { "preset": "jest-preset-angular", "setupFilesAfterEnv": [ "<rootDir>/setupJest.ts" ], "testPathIgnorePatterns": [ "<rootDir>/node_modules/", "<rootDir>/dist/", "<rootDir>/src/test.ts" ] }, "dependencies": { "@angular/animations": "^10.0.11", "@angular/cdk": "^10.1.3", "@angular/common": "~10.0.1", "@angular/compiler": "~10.0.1", "@angular/core": "~10.0.1", "@angular/forms": "~10.0.1", "@angular/material": "^10.1.3", "@angular/platform-browser": "~10.0.1", "@angular/platform-browser-dynamic": "~10.0.1", "@angular/router": "~10.0.1", "@volo/abp.ng.account": "~3.0.4", "@volo/abp.ng.audit-logging": "~3.0.4", "@volo/abp.ng.identity": "~3.0.4", "@volo/abp.ng.identity-server": "~3.0.4", "@volo/abp.ng.language-management": "~3.0.4", "@volo/abp.ng.saas": "~3.0.4", "@volo/abp.ng.text-template-management": "~3.0.4", "@volo/abp.ng.theme.lepton": "~3.0.4", "jest": "^26.0.1", "jest-preset-angular": "^8.2.1", "rxjs": "~6.5.4", "tslib": "^2.0.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1000.0", "@angular-devkit/build-ng-packagr": "~0.1000.0", "@angular/cli": "~10.0.0", "@angular/compiler-cli": "~10.0.1", "@angular/language-service": "~10.0.1", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^5.1.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.5.0", "ng-packagr": "^10.0.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.9.5" } }
now facing below issues
ERROR in src/app/account/account.component.ts:5:3 - error TS2305: Module '"../../../node_modules/@abp/ng.core/abp-ng.core"' has no exported member 'getAbpRoutes'.
5 getAbpRoutes, ~~~~~~~~~~~~ src/app/app.module.ts:5:47 - error TS2307: Cannot find module '@abp/ng.setting-management.config' or its corresponding type declarations.
5 import { SettingManagementConfigModule } from '@abp/ng.setting-management.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:10:40 - error TS2307: Cannot find module '@ngxs/logger-plugin' or its corresponding type declarations.
10 import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin'; ~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:12:37 - error TS2307: Cannot find module '@volo/abp.ng.account.config' or its corresponding type declarations.
12 import { AccountConfigModule } from '@volo/abp.ng.account.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:13:42 - error TS2307: Cannot find module '@volo/abp.ng.audit-logging.config' or its corresponding type declarations.
13 import { AuditLoggingConfigModule } from '@volo/abp.ng.audit-logging.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:14:44 - error TS2307: Cannot find module '@volo/abp.ng.identity-server.config' or its corresponding type declarations.
14 import { IdentityServerConfigModule } from '@volo/abp.ng.identity-server.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:15:38 - error TS2307: Cannot find module '@volo/abp.ng.identity.config' or its corresponding type declarations.
15 import { IdentityConfigModule } from '@volo/abp.ng.identity.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:16:48 - error TS2307: Cannot find module '@volo/abp.ng.language-management.config' or its corresponding type declarations.
16 import { LanguageManagementConfigModule } from '@volo/abp.ng.language-management.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:17:34 - error TS2307: Cannot find module '@volo/abp.ng.saas.config' or its corresponding type declarations.
17 import { SaasConfigModule } from '@volo/abp.ng.saas.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:18:52 - error TS2307: Cannot find module '@volo/abp.ng.text-template-management.config' or its corresponding type declarations.
18 import { TextTemplateManagementConfigModule } from '@volo/abp.ng.text-template-management.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Yes. Issue seems fixed after saas module update.
Any update on this.
2020-07-11 19:53:14.820 +05:30 [DBG] Setting the cache item: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.820 +05:30 [DBG] Finished setting the cache item: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.820 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.821 +05:30 [DBG] Found in the cache: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.821 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Litmus_App,n:ProfileManagement.Sample
2020-07-11 19:53:14.822 +05:30 [DBG] Found in the cache: pn:C,pk:Litmus_App,n:ProfileManagement.Sample
2020-07-11 19:53:14.822 +05:30 [INF] Authorization failed.
2020-07-11 19:53:16.836 +05:30 [WRN] ---------- RemoteServiceErrorInfo ----------
2020-07-11 19:53:16.840 +05:30 [WRN] {
"code": null,
"message": "Authorization failed! Given policy has not granted.",
"details": null,
"validationErrors": null
}
2020-07-11 19:53:16.841 +05:30 [WRN] Authorization failed! Given policy has not granted.
Volo.Abp.Authorization.AbpAuthorizationException: Authorization failed! Given policy has not granted.
at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy)
at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context)
at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at lambda_method(Closure , Object )
It is not working for Tenant but working for Host application.