I had tried configure scopes with wso2apim, but my ldap groups has spaces in their names, someone already had that problem?
Someone know how to fix this problem?
Thank you
I discovered what is the problem, in the package: org.wso2.carbon.apimgt.impl.handlers
The class ScopesIssuer, has the line code:
List<String> roleList = new ArrayList<String>(Arrays.asList(roles.replaceAll(" ", "").split(",")));
Where the role list suffer a replace and all spaces are removed from the list, this cause problems with groups with white spaces, I have replace this logic and resolv that problem.
Version: APIM 1.9.1
Thank you.
Related
I have a problem with Nagvis. There I created several maps with the locations of hosts and used the service lines to display the bandwidth and utilization of individual interfaces. It all worked well until we eventually switched to CheckMK 2.0. We have renamed the interfaces and theoretically it would not be a problem to simply transfer the new names to NagVis.
However, the regex error mentioned below occurs. I also checked the new label with the regex using regex101 and found that the label has changed. It is structured according to the pattern: 'Interface_Name "Interface description"'. Nagvis's regex doesn't allow quotes, and thus neither does the name of the interface.
I'm relatively new to this and haven't had much to do with it before. One solution would be to escape the quotation marks, but I don't know where to do that. If you have any suggestions for a solution, I would be very grateful.
If you have any questions, just ask.
CMK version: 2.0.0p26
OS version: Windows 10
Error message: The attribute has the wrong format (Regex: /^[0-9a-zа-яё\p{L}\s:+_.,'-*?!##=/]+ $/u).
Can someone help me understand why I am getting a syntax error for this PHPMyAdmin query? A developer did a find and replace for window popups and it truncated the replacement on hundreds of pages to 'onclick="return false;"' by mistake. Full code needed in in the replacement field below.
UPDATE `r61bq_content` SET `introtext` = replace(introtext, 'onclick="return false;"', 'onclick="window.open(this.href, \'\', \'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=500,height=50\'); return false;"')
thanks in advance!
I was able to do it with the PHPMyAdmin find and replace:
onclick="window.open(this.href,\'\', \'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=500,height=50\'); return false;"
if anyone needs to know.
We use serilog to output from our .nrt core app. We are using compact json to keep size down. In compact it seems to put the error key with an # sign;
"#l": "Warning"
I can’t seem to get a filter working it either returns no results or says error. I’ve tried many things but I’m sure this should work;
{ $.#l = "Warning" }
Anyone suggest where I’m going wrong.
I don't think you can use # in the selector. From the docs:
Property selectors are alphanumeric strings that also support '-' and '_' characters.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html#extract-json-log-event-values
One way to get around this would be to match the line as if it's not part of json.
For example, if your log line looks like this:
"#l": "Warning"
you could filter it out with:
[key="#l", colon, value=Warning]
I had the same issue. Most likely you used Serilog.Formatting.Compact.CompactJsonFormatter as me.
Implementing own ITextFormatter is a workaround because prefixes like # or $ are hardcoded inside CompactJsonFormatter.
I used CompactJsonFormatter as a basis, replaced there usage of #, $ by s_ and it works.
I have a list with URLs and IPs for Office365 in XML format. Now I'd like to either write a script or use a text editor's search and replace function (regex) to automatically change some of these URLs.
Example:
These URLs
<address>scus-odc.officeapps.live.com</address>
<address>scus-roaming.officeapps.live.com</address>
<address>sea-odc.officeapps.live.com</address>
Should be changed to
<address>*.officeapps.live.com</address>
<address>*.officeapps.live.com</address>
<address>*.officeapps.live.com</address>
I would appreciate any input on this issue. Thanks in advance.
Here is what I have tried so far:
1)Search for ..(?=[^.].[^.]*$) and replace with an empty string.This does a good job but unfortunately it removes the preceeding as well...
2)As pointed out by Tim, the list consists of FQDNs with different domains.The list is available from https://go.microsoft.com/fwlink/?LinkId=533185 (This list includes all FQDNs - The IPs will get deleted)
3) Solved with the help of Sergio's input. The solution was to
search for (>)[^.\n\s]+ and substitute with \1\*
I will have to write another script to delete the multiple domains but that was not part of the question so I consider this issue closed. Thank you for your input.
You can use the regex:
(>)[^.\n\s]+
and substitute with \1\*
Consider the following file path:
\\fileserver\share\documents\department\my_project\a_sub_folder\myfile.doc
I need to extract the text "\documents\department\my_project" with a regular expression. Details:
Exclude "fileserver" and "share"
Limit to 3 "logical" top level folders after, thereby excluding "\a_sub_folder"
Don't include file name ("myfile.doc")
Using the following regex..:
^.*share(?P<folders>\\.+)\\.+
..I get this in my "folders" group:
\documents\department\my_project\a_sub_folder
The part that nags me is how to get rid of "a_sub_folder". I've tried adding repetition operators to the folders-group with no effect:
^.*share(?P<folders>\\.+){1,3}\\.+
^.*share(?P<folders>\\.+){1,3}?\\.+
The first one of the two above doesn't change the output, while the second one returns an empty group "folders"
I have a feeling that my regex is fundamentally wrong, but unable to see why. Can anyone please shed some light this?
thanks :)
/Geir
How about:
^.*share(?P<folders>(?:\\[^\\]+){1,3})