What does atlOrigin query parameter mean in Jira URL? - security

When I open a Jira issue link from a third party or copy from a clipboard I always find the URL looks like this:
https://mycompany.atlassian.net/browse/comapnyAlias-issueNumber?atlOrigin=longCharacters
I am curious what does atlOrigin means? and why do they use it?

There is a small explanation here https://developer.atlassian.com/developer-guide/client-identification/
Origin ID for links to Atlassian UI
Identify HTML links into our product user interface with a unique atlOrigin query string parameter added to the URL. This is similar to the UTM parameter used for click tracking in marketing web sites. In this context, uniqueness is guaranteed by Atlassian issuing the origin ID. For example, if linking into Jira’s Issue page:
https://devpartisan.atlassian.net/browse/TIS-11?atlOrigin=abc123
We generate a unique value for each integration so if you have more than 1 integration, please make sure we have properly associated each integration to a different origin value.
We do not recommend using this parameter in REST APIs or OAuth 2.0 flows, where this parameter might not be properly ignored.
Result is very Google Search - unfriendly to come up 😕

Related

Instagram URL tracking parameters

For example, if you get a link to your profile in the Instagram app, you can use the with the parameter igshid. What does this mean?
From what I've found, I believe it's a tracking parameter, but should I remove this parameter when embedding it in the web site?
Please let me know if you have any documentation or sites on this parameter.
It is most likely used to track the user's account in which the embed or link was generated from. There is no official documentation or information on it, nor does there appear to be any benefit to using it.
Since it's an optional parameter, you're best off eliminating it if you do not want to be tracked.

Anyway for GitHub api v3 to determine and give names of CODEOWNERS

https://help.github.com/en/articles/about-code-owners
From the above documentation I’m trying to determine code and file owners of a particular file. I haven’t been able to find anything that gives this information within the GitHub documentation.
The closest I found was this, GitHub API v3: Determine if user is an Owner of an Organization
But that seems to be answering a slightly different question.
I've built an npm library called codeowners-api which does this . So its not python but in JS.
If you want to use REST you would need to fetch the codeowners file from the Repo in question using Github's get-file API.
After that you take the file and you iterate over the codeowners file until you find the match. You can look at my library's code as reference.
I've also created a chrome extension which gives the reviewer a filter button to see only their relevant files.
https://chrome.google.com/webstore/detail/codeowners/mklphhfajjbikchaodnibnjmeibbonhb
For those whoever get stuck in this situation and can't use that library^, I managed to find a work around where I use .search_issues() and then query repo:x+review:approved+is:open+is:pr, the review does not switch to approved until a Codeowner has approved the PR.
This is the best way I've found to do this:
List requested reviewers for a pull request using the Pull Requests API: https://docs.github.com/en/github-ae#latest/rest/reference/pulls#list-requested-reviewers-for-a-pull-request. This will give you a list of usernames and a list of teams.
Codeowners are essentially just teams or individuals assigned to watch over certain parts of the codebase. In my case, I wanted a list of usernames who are part of each codeowning team. So for each codeowning team that I got in Step 1, I used the Teams API to get lists of the team members: https://docs.github.com/en/rest/reference/teams#list-team-members.
Caveats of this approach:
Step 1 of this approach lists out all of those whose reviews were requested on the PR. While Github automatically requests reviews from codeowning individuals and teams, one can manually request reviews as well. This step does not distinguish between automatic review requests (which suggest codeowner status) and manual review requests.

Spring Data Rest Frontend deep linking

So i have been struggling with this one question some time now:
How to handle details Page or deep linking on the Frontend.
So, say, we got a paged collection endpoint with user entities in it and a React App consuming the endpoint.
The flow would be, user authenticates, gets collections, clicks on an item and is either:
Redirected to a new Url say: webapp.com/users/userid
A modal opens with the user details.
Say we got a scenario were two people working with the webapp, Person 1 wants to share a link with Person 2. Person 2 should do some updates on a specific user, which is identified by the link.
The link should be something like : https://www.webapp.com/users/{slug or id}
With Option 2 this functionality is not mappable.
With Option 1 we got to expose the ids in the response to identify the resource, which may work, but we would still need to hardcode the url, as the findById method is not exported as a Uri Template.
So, my Solution would be to add a slug for the resources, implement a search method by the slug, and then get the user, if found, by its self-link.
Sounds like a good solution for me, but on the other hand, I would have to add an extra frontend id(the slug here) which would need to be also unique, to the database model.
So how do you guys handle a problem like this, or is there anybody using spring data rest in this way or in production mode where you have the handle situations like this?
Should mention that this isn’t a primary problem with spring data rest but rather with hateoas itself.
thanks in advance
Florian
You don't need to hardcode URL template. Spring data rest will generate links for each resource.
You can refer to it from front end by some format like: {your_user_object}._links.self.href

How do i fetch only internal messages from O365 using Graph API

I wan't to fetch only messages that are only internal to organization.
Right now the way i see is fetch domains first then for each message see if from/sender domain belongs to that message , based on that differentiate.
But this is lengthy process and not a foolproof technique.
Is there any GRAPH API query i can use which readily provides this ?
It does not apear that the REST API queries for Office 365 includes this information directly in the messages. From the Version 2.0 And the Beta this is not included in message output.
However, it looks like you might be able to get it from the REST API via the headers.
Try the following query:
https://graph.microsoft.com/beta/me/messages?$select=internetMessageHeaders&$top=1
This takes top one messages and shows you the email header of the message.
In the header look for X-OriginatorOrg. The value should be the main domain of your organisation.
Alternatively you can look at the X-MS-Exchange-Organization-MessageDirectionalityheader. If the value here is Originating it should come from inside your own organisation.

Is it allowed to use this link (https://www.instagram.com/[username]/?__a=1)

at the moment I am working on a Instagram implementation for the homepage of my school.
My problem was, that I didn’t got access to the account, so I couldn’t generate an access token (which all free joomla plugins need).
So I have decided to write my own plugin (I am not the best programmer, but it works), because of that I found this link (https://www.instagram.com/[username]/?__a=1) where I could get the JSON of the public page without the need of any token or ID.
My question is if I am allowed to use it or not (because I can’t find this link in the official api)?
We've built a small API that scrapes exactly that data and presents it to you via JSON:
https://apinsta.herokuapp.com/u/<username>
(In case you are still interested in this)
This URL closed by instagram on 14 April. You can get user's information json with this link:
https://i.instagram.com/api/v1/users/USER_ID/info/
Also you can find user ID like this:
Go to the https://www.instagram.com/USERNAME/
Look source code and find this code:
"id":"
You'll see the user ID between quotes.
Good luck.

Resources