For example I have userA which is belong to groupA. How I could search all groups by specified authority?
This code find just all groups what I have
QNAME:"sys:system/sys:authorities/*"
So I want to filter out somehow.
There are services for that, if using java use the AuthorityService: http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/security/AuthorityService.html
In javascript the People API could be sufficient: http://wiki.alfresco.com/wiki/4.0_JavaScript_API#People_API
Related
I am very new to Azure and currently looking for assistance to help me start my project. Recently I am trying to automate the process of adding alerts for our Azure CosmosDB.
After some research, it looks like I can use Add-AzMetricAlertRuleV2 to add alerts through powershell. According to MS online document I will need to pass $condition to add the rule to the existing ResourceGroup. Where can I get all the existing conditions that I can add to the rule so I can sort out the one that is needed? Some people use New-AzMetricAlertRuleV2Criteria to assign the value that need to be passed to $condition. And I can see some example from MS website: https://learn.microsoft.com/en-us/powershell/module/az.monitor/new-azmetricalertrulev2criteria?view=azps-5.0.0
However the above document from MS is not clear to me where I can find the whole list of the name spaces along with the existing criterias that I can add. For example, if I want to add an alert when a new cosmos DB is created on one of the existing ResourceGroup using powershell, where can I check what is the name space I can use to add the new criteria? In another word, where can I find out all the existing conditions with the name space along with them? Thanks,
For cosmos DB, the metric namespace will be Microsoft.DocumentDB/databaseAccounts.
I have some questions about SignalR.
An app scenario: An user can join/leave to many groups (NxN). But
those groups can be changed with a new request. So, how to remove an
user from all joined groups and add him to new list of groups? (Such
as: in first request i join A,B,C groups and with second request i
want to be in only groupS X,Z -i'm not listening a,b,c groups anymore-).
How to check a group name if it's already exists?
How to remove a group if it has no users/members in it? (garbage collector)
Hope someone helps me here!
(Signalr core: 2.2)
SignalR don't provide you the list of users that are in groups, how many groups there are and their names. So the logic that you need to implement is create for example a Dictionary so you can add there the name of your group and the users that are associated to that group. So when a request comes to change user from group A to group B you can do:
Lookup in what groups the user is.
Remove the user from the group.
Create the new group and add it to your Dictionary.
Add the user to the new group.
I believe this is a good aproach if you have one SignalR app/host because if you will have many instances of your signalR app, you can not access to the Dictionary to see if there is a user in some group in some other instance.
I'm working on connecting our on prem AD with AWS by following this article. We have our AD Groups that are to be translated into AWS groups written in the format AWS#Account#Role#AccountNumber in AD. In ADFS, I am writing a custom claim that is to take that particular claim and convert it to the arn that requires the role and account number that is defined in teh AD Group name. I was hoping to use a RegExReplace with a match type of ((?i)([-_a-z0-9]+) which should accurately give me multiple matches back from the incoming token.
My question is, is there a way that I can use the multiple matches generated there to generate one string ("arn:aws:iam::saml-provider/ADFS,arn:aws:iam::role/")that leverages the multiple matches to generate the AWS format I need?
I dont normally work with ADFS but this is something I was tasked to figure out and any help would be greatly appreciated.
In my Roles rule (executes after the gathering of AD Groups rule), I updated my claims rule language transform to:
c:[Type=="http://temp/variable",
Value=~"(?i)(^AWS)#([-_a-z0-9]+)#([-_a-z0-9]+)#([-_a-z0-9]+)"] =>
issue(Type="https://aws.amazon.com/SAML/Attributes/Role",
Value=RegExReplace(c.Value,
"(?i)(^AWS)#(?<accountname>[-_a-z0-9]+)#(?<role>[-_a-z0-9]+)#(?<accountnumber>[-a-z0-9]+)",
"arn:aws:iam:${accountnumber}:saml-provider/ADFS,arn:aws:iam:${accountnumber}:role/${role}))
This basically says, for any AD Group that was added the to the temp variable and matches this regex, issue a claim of this type. In the RegExReplace, I assigned variable names to the grouping matches and then accessed those matches using the ${} syntax. This did the trick and now I see the list of roles in the arn format.
Is there any way I can find if users is present in both the groups here: user 1 so that notification/data can be sent to only that set of common users only?
As DB grows I think it will be inefficient to check if every user in one group is present in another or not.
Yes there is. You can create a list of users from GroupA, then create another list of users from GroupsB and then just simply use this line of code using Java8:
!Collections.disjoint(list1, list2);
Looking at the API documentation linked below makes me confused. The parameter name "ids" suggest due to its plural form of "id" that I should be able to fetch data from multiple tables in one request, right?
However, this (vaguely) suggest the opposite:
The unique table ID used to retrieve the Analytics Report data. This ID is provided by the element for each entry in the account feed. This value is composed of the ga: namespace and the view (profile) ID of the web property.
https://developers.google.com/analytics/devguides/reporting/core/v2/gdataReferenceDataFeed#ids
What I want to do is fetch visitor data from more than one table in one request and get them summed up and ready to use.
Is this possible?
Thanks!
This is not possible. You will need to make 2 separate requests for each table ID.