I need to get all configuration settings (current role or all roles not matter) from Azure cscfg file. I want to do this because i dont want to get all values one by one via RoleEnvironment.GetConfigurationSettingValue(key) method.
Is there any way to do this?
Regards
The short answer is 'no' the RoleEnvironment does not support getting all the configuration setting values.
A slightly longer answer is that getting configuration settings from the role environment in the current implementation is done through a call to native code. The separation of Windows Azure Application from Windows Azure Configuration and the ability to swap settings on a running application is at the root of this somehow. This is done inside of msshrtmi.dll (which should mean something like Microsoft Shared Runtime Managed Interop). This is the only reference Microsoft.WindowsAzure.ServiceRuntime.dll has apart from standard references to .NET.
Here is the method call to native code (I have not gone further than this):
[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType=MethodCodeType.Native), SuppressUnmanagedCodeSecurity, DllImport("", EntryPoint="", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
internal static extern unsafe int modopt(IsLong) modopt(CallConvStdcall) RdGetApplicationConfigurationSetting(ushort modopt(IsConst), ushort*);
It might seem like a slightly round-about way of doing it, but if you want to get the configurations for all the roles in a deployment you can use the management api.
Kudu has an API for this.
You get to Kudu like via App Services > Advanced Details > Go
https://{app-service-name}.scm.azurewebsites.net/
or
https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
The Url for the settings API is:
https://{app-service-name}.azurewebsites.net/api/settings or https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
Related
When I log in "user-portal" of WSO2 Identity Server (the url is "https://localhost:9443/user-portal/overview"), I can see four options to change the language (english, portuguese, sinhalese or tamil).
I need to add more options in this section. How can I do this? I can't see a "Resource.properties" inside the folder "/repository/deployment/server/webapps/user-portal" to do something like in the following link https://is.docs.wso2.com/en/latest/develop/localization-support-in-identity-server/#localization-support-in-identity-server.
Thanks in advance.
Gonzalo.
WSO2IS UserPortal is a React-based application and in there what is done is to combine all the configurations in i118 to react config mappings if you want to change anything you need to do it at the code level.
https://github.com/wso2/identity-apps/blob/v1.0.72/apps/user-portal/src/configs/i18n.ts
you can map all the configs to your preferred language and map them to the configurations used in UserPortal by building the package.
Is there any documentation page, source code, config file that has the details of all SCC's and not just the Restricted (which is used as example in every bit of documentation)?
And I don't have a running OpenShift instance to inquire this from the commandline.
Here's what i mean by detailed:
https://docs.okd.io/latest/admin_guide/manage_scc.html#examining-a-security-context-constraints-object
Here is the design proposal of security-context-constraints
I've been looking for a way to directly access a widget from my SonarQube instance with a direct URL, the way it's possible to access a Dashboard. Is it possible to do that adding the respective metrics from the configuration of the Widget? The problem I found is that I can only "build" a widget and it takes the filter parameter, sizes, but when it comes to the metrics, they are ignored and it builds it with the default ones for the respective widget.
I have the following Widget configured (with metrics: Classes, Comment_Density and size - Complexity):
When building the URL to get directly this widget, I found it impossible to access it by its Id. So, I added all configuration details, but the widget I get is this, holding the default metrics - Lines of Code, Issues and Technical Debt. Built widget:
Is accessing directly a configured Widget even possible with the current versions of the SonarQube?
The URL I used is :
<sonarqubeinstance>/widget?id=measure_filter_bubble_chart&filter=1&chartTitle=Measure%20Bubble%20Chart&chartHeight=400&widget_width=1279px&metric1=classes&metric2=comment_lines_density&metric3=complexity
Thanks in advance for your help!
What you try to achieve is not possible.
What's more, keep in mind that those widgets do not exist any more starting with SonarQube 6.2. And there is no plan to reintroduce them.
I have installed a standalone instance of wso2 API Manager 1.10.0 with the CARBON-PATCH-4.4.0-0084 installed. I am walking through the PhoneVerification tutorial and have published the API as instructed. I created a new user for the store and am trying to subscribe to the PhoneVerification-2.0.0 API but cannot because there is no DefaultApplication in the Applications dropdown list. It is missing from the list. I tried to add and application and get an error dialog saying Missing Parameters. I am stuck and cannot go any further. One additional piece of information, I am using mysql instead of the h2 default. I followed all the instructions to setup mysql and had no problems. Also I changed the admin password as well.
I have tried API Manager 1.10 with security patch CARBON-PATCH-4.4.0-0084 with no issues. I can create APIs and subscribe using the DefaultApplication. I tried with default database and a new user who is assigned to 'Internal/subscriber' role.
Please check if you have any other changes for Store Web app at 'wso2am-1.10.0/repository/deployment/server/jaggeryapps/store'. You have to replace 'store' and 'publisher' apps as instructed in the Readme of patch.
(iii) Merge and Replace resource/store to /repository/deployment/server/jaggeryapps/store
(iv) Merge and Replace resource/publisher to /repository/deployment/server/jaggeryapps/publisher
To check if the Mysql configuration worked properly, please check if there are any errors in Carbon log, at 'repository/logs/wso2carbon.log' file related to that. And double check if userstore and api-manager database tables are created properly and configured in 'repository/conf/datasources/master-datasources.xml' properly.
Packaging a log4j configuration file in a NetBeans Platform application apparently requires some thinking through. This is what I tried...
I put log4j.xml in src/main/resources/my/package/log4j.xml of some_netbeans_module. The package is a public module package (i.e. classes from this package are used from other packages). I rebuilt the module and confirmed that the file does, in fact, get packaged into the module.
In my classes I get an instance of the logger the way I always do:
static final Logger log = Logger.getLogger(ThisClass.class);
Every NetBeans Platform application has a my_app.conf file which makes it possible to set certain properties. This is where I set log4j.conf:
log4j.configuration="/my/package/log4j.xml"
Now, when I run the application, I see the following output:
[INFO] /home/me/my_app/application/target/my_app/bin/../etc/my_app.conf: 5:
log4j.configuration=/my/package/log4j.xml: not found
What is wrong with the above configuration?
In the my_app.conf file if you append the log4j.configuration property to the default_options property, like so:
default_options="...<other options> -J-Dlog4j.configuration=my/package/log4j.xml"
then this option will get passed to the JVM. Notice that the log4j property has -J-D appended to it. The -J is used by NetBeans to delineate JVM properties and the -D is used by the JVM to delineate a system property.
Also you can/should drop the quotes and the initial / as the quotes are not necessary and NetBeans will complain if you have the initial /
The other way to do this, and the way that I prefer since it doesn't require editing the .conf file, is to put the log4j.xml file into the default package. If you have other requirements that prevents you from doing this then remember that you must put the log4j.configuration property in the app's platform.properties file while your in dev mode and running the app inside of the IDE. Like so:
run.args.extra=-J-Dlog4j.configuration=my/package/log4j.xml
Edit: For questions regarding NetBeans Platform you might have better luck posting to the NetBeans Platform Users forum.