end Auth Adapter Ldap in 1.10.6 is not backward compatible - zend-framework

Zend Auth Adapter Ldap in 1.10.6 fails when using the same options
ldap.server1.baseDn = "CN=Users,DC=webex,DC=local" (this is just one option)
the exact same option works in the previous 1.5 or 1.6 versions
if i change the above option to
ldap.server1.baseDn = "DC=webex,DC=local"
then it works but would always return Invalid Credentials even if the case is Identity Not Found
does anyone know why?

Is there an option for scope? Entry, subtree, base perhaps? Subtree of course is what you want in this context.

Related

Is "health.config.enabled" still being processed, and where?

Is the property "health.config.enabled" still valid and being processed in current Spring Cloud?
If yes, where in the code it is being done?
The property is in the current official documentation and has worked well for me so far (in cloud clients).
But as a whole string, it cannot be found anywhere in the current source code (besides the doc source).
For me as a beginner, it was easy to find in the old version of ConfigClientAutoConfiguration.java
Recent version of ConfigClientAutoConfiguration.java does not contain that whole property name, although I guess it's still being processed but in a more abstract way that I don't understand yet. Thus I'd appreciate even a hint in the form of "what used to be done on line "#ConditionalOnProperty(value = "health.config.enabled", matchIfMissing = true)" before is now roughly done on line XY".
Thanks.
It is replaced by #ConditionalOnEnabledHealthIndicator("config") (see here).
From the javadoc for that annotation
Blockquote
#Conditional that checks whether a default health indicator is enabled. Matches if the value of the management.health.<name>.enabled
So the new property is management.health.config.enabled

Charles Proxy Rewrite & MapLocal - how to match exact query

I only want to return certain response specifically for /path/embed=profile&prefetch=true&couples_only=false and NOT embed=profile&prefetch=true&couples_only=false&ANYTHINGELSE
But Charles seems to be treating the 2 queries the same
What I've tried
/path/embed=profile&prefetch=true&couples_only=false? - hoping the ? will match 1 character or nothing, ruling out the wanted longer queries
embed=profile&prefetch=true&couples_only=false(?!&) - standard regex, tested in regexr.com
What else can I do?
From what I remember, it's a bug and it hasn't fixed ever since.
You might try Proxyman, which is similar to Charles and it will solve your problem.
Here is the step:
Setup the certificate on your macOS (Certificate -> Install on macOS)
Make a request
Right-click to show a menu context -> Tool -> Map Local or Breakpoint
Create a rule with default value -> It will match exactly the query as you wish.
For the Map Local, you can modify the local file in the Editor.
For the Scripting (It's the same with ReWrite, but write by Javascript)
Disclaimer: I create this app. Hope that it can help you for daily works.

How to introduce versioning for endpoints for akka http

I have 5 controllers in akka-http. Each endpoint has 5 endpoints(routes). Now I need to introduce versioning for those. All endpoints should be prefixed with /version1.
For example if there was an endpoint xyz now it should be /version1/xyz.
One of the ways is to add a pathPrefix But it needs to be added to each controller.
Is there way to add it at a common place so that it appears for all endpoints.
I am using akka-http with scala.
You can create a base route, that accepts paths like /version1/... and refers to internal routes without path prefix.
val version1Route = path("xyz") {
...
}
val version2Route = path("xyz") {
...
}
val route = pathPrefix("version1") {
version1Route
} ~ pathPrefix("version2") {
version2Route
}
Indirect Answer
Aleksey Isachenkov's answer is the correct direct solution.
One alternative is to put versioning in the hostname instead of the path. Once you have "version1" of your Route values in source-control then you can tag that checkin as "version1", deploy it into production, and then use DNS entries to set the service name to version1.myservice.com.
Then, once newer functionality becomes necessary you update your code and tag it in source-control as "version2". Release this updated build and use DNS to set the name as version2.myservice.com, while still keeping the version1 instance running. This would result in two active services running independently.
The benefits of this method are:
Your code does not continuously grow longer as new versions are released.
You can use logging to figure out if a version hasn't been used in a long time and then just kill that running instance of the service to End-Of-Life the version.
You can use DNS to define your current "production" version by having production.myservice.com point to whichever version of the service you want. For example: once you've released version24.myservice.com and tested it for a while you can update the production.myservice.com pointer to go to 24 from 23. The old version can stay running for any users that don't want to upgrade, but anybody who wants the latest version can always use "production".

How do I programmatically set the length of Most Recent Used files in Eclipse

In Eclipse, I'm aware of the Preference setting for the number of recently opened files to offer:
For users of my RCP application I'd like to change the default length from 4 to 10.
I'm aware of the PreferenceManager, and can navigate to the correct node using this:
IPreferenceNode editorPrefs = preferenceManager.find
("/org.eclipse.ui.preferencePages.Workbench/org.eclipse.ui.preferencePages.Editors");
But, once I've found the node, I can't see how to access the specific property, in order to modify a value.
Anyone one done this before? Any tips?
Alternatively, I'm happy to do it via extension-point, but I couldn't get even this far via that mechanism.
This preference is set in the preferences for the org.eclipse.ui.workbench plugin. You can access this using ScopedPreferenceStore
IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.ui.workbench");
The key for recent files is RECENT_FILES so:
store.setValue("RECENT_FILES", value);
You may need to call the save() method to store the changes.
Note: it should also be possible [1] to update the preference from the .ini file. But it didn't work for me.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=128411#c2

How to pass BuildConfig to workbench rest api

Following workbench rest api documentation says we can pass BundleConfig to maven/compile post call but I couldn't find an example of BundleConfig json. I want to bump up the version number of my project when i issue maven compile.
[POST] /repositories/{repositoryName}/projects/{projectName}/maven/compile
Compiles the project (equivalent to mvn compile)
Consumes a BuildConfig instance. While this must be supplied, it's not needed for the operation and may be left blank.
Returns a CompileProjectRequest instance
I've found this works:
BuildConfig buildConfig = new BuildConfig();
InstallProjectRequest response = restTemplate.postForObject(
URL_MVN_INSTALL, new HttpEntity<>(buildConfig, createHeaders()), InstallProjectRequest.class);
However, I don't think its possible to use buildConfig to update the version number (not yet anyway).
But you can achieve the same result by embedding the application in an iframe and using some javascript/jquery magic.