Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 12 2020 01:41

    jtkech on patch-1

    (compare)

  • Apr 12 2020 01:39

    jtkech on patch-1

    Update ZoneShapes.cs (compare)

Niraj Soni
@ns8482e
@jimitndiaye have you tried updating call back path?
Jimit Ndiaye
@jimitndiaye
@ns8482e not sure what you mean
Dean Marcussen
@deanmarcussen
issue is you need to use same data protection provider. what @ns8482e said. it will not work easily
Jimit Ndiaye
@jimitndiaye
@deanmarcussen not even if you intercept the request early enough in the pipeline?
Dean Marcussen
@deanmarcussen
issue is you need to use same data protection provider.
Jimit Ndiaye
@jimitndiaye
i'm sure there is some basic understanding i'm missing regarding routing of OpenId request to the callback path
stating the goal for summary:
given a specific callback path /sign-tenant-oidc that is used by multiple sub-tenants (non-default tenants), intercept requests to that path such that they end up going to the correct tenant for decryption and processing. Assume that the authentication parameters from the idp include a parameter to identifier the target tenant, say tenantName. This parameter should be used to send the request to the correct tenant
this callback path will only be declared in the sub-tenants, not in the default tenant (which has its own unique callback path that is working correctly)
Jimit Ndiaye
@jimitndiaye
the scenario can be reproduced by configuring the openid client module in all tenants with the callback path for the default tenant set /signin-oidc and that for each of the sub-tenants set to /signin-tenant-oidc
Dean Marcussen
@deanmarcussen
for summary: won't work. the dp keys are different, there is no simple way to do what you want to do. putting values in the state won't work, because the state is data protected per tenant. so you can't unwrap it easily
Jimit Ndiaye
@jimitndiaye
the knowledge that i'm missing is what/how the routing is determined when you configure an openid client with a specific callback path
@deanmarcussen ok so unwrapping the message to pull the tenant identifier won't work. how about routing. given that the dp keys are different if you have multiple tenants listening for same path, all of them should fail to process the requests except the one that it was intended for, correct?
@deanmarcussen i ask that because i came across the SkipUnrecognizedRequests setting in OpenIdConnectionOptions which might allow uninvolved tenant handlers to just ignore the messages they can't decrypt due to dp keys and the actual target will succeed.
Dean Marcussen
@deanmarcussen
no, by that point you're inside the tenant middleware, so you'll just end up at a not found page.
your openidconnect callbacks are largely handled by the ASP.NET
Jimit Ndiaye
@jimitndiaye
OK. As an alternative, is it possible to register the tenant specific oidc handler in the default tenant but once authentication is done instead of creating a claims principal, create a new token using the dp key of the target tenant and pass that to a tenant-specific endpoint to rehydrate?
Niraj Soni
@ns8482e
In App registration (AzureAD/Github) have callback to your domain (https://localhost:5001) , and add tenant prefix in callback in options
23 replies
something like below
options.Events = new Microsoft.AspNetCore.Authentication.OAuth.OAuthEvents
        {
            OnRedirectToAuthorizationEndpoint = context =>
           {
               context.Properties.SetParameter("tenantid", _settings.Name);
               if(_settings.RequestUrlPrefix != null)
               {
                   context.Options.CallbackPath = $"/{_settings.RequestUrlPrefix}/{context.Options.CallbackPath}";
               }
               return System.Threading.Tasks.Task.CompletedTask;
           }
        };
Jimit Ndiaye
@jimitndiaye
if you had to choose between the orchard core data protection providers - azure storage vs redis - which would you choose and why?
2 replies
Weimar Coro
@weimarcoro
Hi there, I was wondering if it is possible to inject RoleManager<IRole> for example in a module and manage roles from there? Where can I find information about that?
1 reply
Josiah Nunemaker
@JosNun
Is there a way to debug the Orchard source while also using some of the orchard modules from NuGet? When I try, I get a bunch of conflicting version errors (NU1106).
1 reply
Jimit Ndiaye
@jimitndiaye
how does orchardcore determine the area name (url path at which that module/theme's content can be reached) associated with a module or theme. is it from the assembly name or from the name in module/theme's manifest?
orchardcore's source code usuall have the the assembly name equal the name in the manifest but not all of mine adhere to that rule and i've been confused as to which one will be picked.
e.g. assembly name is My.Company.ModuleA.dll and the manifest says ModuleA. Which one will be the area name? Will the home route in the module be ~/My.Company.ModuleA/Home/Index or ~/ModuleA/Home/Index
Niraj Soni
@ns8482e
I guess it's project's name
Jimit Ndiaye
@jimitndiaye
@ns8482e so neither the assembly name nor the manifest name affect this? it's just the project name? how would it work when it is from a nuget package then rather than a project reference
Niraj Soni
@ns8482e
I , keep all same, project name, assembly name, default namespace, module id and package id
CrestApps
@CrestApps
The Color editor for TextField seems to be defaulting to use #000000 color. Is there a way to remove the selected color by default?
Jimit Ndiaye
@jimitndiaye
does anyone know what i'm missing when orchard throws the following error InvalidOperationException: A descriptor for '/Areas/My.Module/Pages/_Host.cshtml' was not found.
Jimit Ndiaye
@jimitndiaye
Here's the stack trace if it tells you anything
System.InvalidOperationException: A descriptor for '/Areas/My.Module/Pages/_Host.cshtml' was not found.
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.CompiledPageActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.UpdateCollection()
   at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.Initialize()
   at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.<>c__DisplayClass11_0.<Subscribe>b__0()
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.Subscribe()
   at Microsoft.AspNetCore.Mvc.Routing.ControllerActionEndpointDataSource..ctor(ControllerActionEndpointDataSourceIdProvider dataSourceIdProvider, IActionDescriptorCollectionProvider actions, ActionEndpointFactory endpointFactory, OrderedEndpointsSequenceProvider orderSequence)
   at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints)
   at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, String name, String pattern, Object defaults, Object constraints, Object dataTokens)
   at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapAreaControllerRoute(IEndpointRouteBuilder endpoints, String name, String areaName, String pattern, Object defaults, Object constraints, Object dataTokens)
   at OrchardCore.Features.Startup.Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
   at OrchardCore.Modules.ModularTenantRouterMiddleware.<>c__DisplayClass7_0.<ConfigureTenantPipeline>b__1(IEndpointRouteBuilder routes)
   at Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action`1 configure)
   at OrchardCore.Modules.ModularTenantRouterMiddleware.ConfigureTenantPipeline(IApplicationBuilder appBuilder)
   at OrchardCore.Modules.ModularTenantRouterMiddleware.<BuildTenantPipeline>b__6_0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at OrchardCore.Modules.ModularTenantRouterMiddleware.BuildTenantPipeline()
   at OrchardCore.Modules.ModularTenantRouterMiddleware.InitializePipelineAsync(ShellContext shellContext)
   at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext)
   at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
   at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Seth Cleaver
@scleaver
I am on 1.2.0-preview-16576 - is anyone aware of a bug in admin where drag and drop doesn’t work eg. Menu reorder and setting the anchor on an image doesn’t get saved? If so any ideas when these got fixed
Ok I think it is related to OrchardCMS/OrchardCore#10755
Seth Cleaver
@scleaver
Ok seems to be fixed in latest version
PBMikeW
@PBMikeW
Hi Team, anyway to get a geopoint field through graphQL?
Jeipi Oyams
@boryams90_twitter
Is there a way to add information to Email verification email?
reimac05
@reimac05
Hi guys, I am currently exploring with lucene queries in orchad and wanted to know if it is suited for filtering and sorting a list of content items. Or would you suggest something else? I am retrieving a list of content item of a specific type. The content type is extended by many other custom fields. Based on those fields I need to create filtering components (dropdown single select or multiselct, full text search, order by each field). I just wanted to know if lucene queries would fit this requirements or if I should go with some other approach?
Niraj Soni
@ns8482e
@boryams90_twitte overide shapes templates for verification emails
Niraj Soni
@ns8482e
@jimitndiaye may be related to Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation and .net6? and package is not upgraded in your project to 6?
Jimit Ndiaye
@jimitndiaye
@ns8482e yes package is upgraded to 6
i mean module is upgraded to 6. is there a specific problem with Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation and .net6
Niraj Soni
@ns8482e
Do you have explicit reference to Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation in your project that still on 3.1 or 5? Thats needs to updated to 6
Jimit Ndiaye
@jimitndiaye
i did. just removed it. i'll see if that makes a differnence
Steven Spits
@netwavebe
Hi all, is it possible to re-run a finished workflow activity manually?
Jimit Ndiaye
@jimitndiaye
@ns8482e now I get this:
Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompilerProvider Lifetime: Singleton ImplementationType: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RuntimeViewCompilerProvider': Unable to resolve service for type 'Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager' while attempting to activate 'Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RuntimeViewCompilerProvider'.) (Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RazorReferenceManager Lifetime: Singleton ImplementationType: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RazorReferenceManager': Unable to resolve service for type 'Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager' while attempting to activate 'Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RazorReferenceManager'.) (Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.CSharpCompiler Lifetime: Singleton ImplementationType: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.CSharpCompiler': Unable to resolve service for type 'Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager' while attempting to activate 'Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RazorReferenceManager'.)
Niraj Soni
@ns8482e
which verson of orchardcore are you using?
Han Vermolen
@VermolenHan_twitter

Hi all, I'm trying to use GraphQL to return an article, but only when the taxonomy is of a certain type. (I have 3 different types: article, archive, jobopening) In the query below I'm showing the one for archive.

const data = JSON.stringify({
          query: `{article(where: { contentItemId: "${number}" }) {
                            contentItemId
                            displayText
                            publishedUtc
                            htmlBody {
                                html
                            }
                            render
                            title: displayText                            
                            articleTypes (where: { displayText: "Archive" }) {
                                termContentItems {        
                                    displayText
                                }
                            }
                        }}                        
                `,
        });

Trying this returns the following error.
"GraphQL.Validation.ValidationError: Unknown argument \"where\" on field \"articleTypes\" of type \"[Archive]\"."

What steps do I need to take to allow me to execute the query above? The article type and all the taxonomy types were defined on the Admin Screen. I haven't used any custom code yet.

Jimit Ndiaye
@jimitndiaye
I have a module that depends on ISiteService to set some settings during in its Startup class but I'm getting the error at startup that ISiteService is not yet registered. Does anyknow which module/feature I have to include in my dependencies in order to make sure it is registered first?
essentially I'm using appsettings to load some settings to apply to some modules/features that don't currently support configuration via appsettings like email, login and registration. I load the settings from appsettings then use the ISiteService to apply them ( this is all part of an AutoSetup recipe - we don't want to manually go in to the admin portal to set these settings for each deployment/tenant). Is this the best way to accomplish this?
Niraj Soni
@ns8482e
Use IConfigureOptions or IPostConfigureOptions instead
Jimit Ndiaye
@jimitndiaye
@ns8482e but these aren't uptions though - they are site settings. I've since realized that i can use a recipe to import the settings directly during site creation.
what's the difference between AddGlobalFeatures and AddTenantFeatures on OrchardCoreBuilder? in practical terms would have a global feature mean a single instance services the whole site hierarchy rather than having different instances at the tenant level?
Niraj Soni
@ns8482e
@jimitndiaye you can override from your own custom way if you don't want to set site setting per tenant. Here's related doc https://docs.orchardcore.net/en/latest/docs/reference/core/Configuration/