search operators were not applied
Too few matches were found

Ok, as I just have fixed my SMF OpenID endpoint implementation (read details about some very related problems I had here) where I made a few assumptions on those relations. Of course that doesn't prove them right (so please correct me). Here they are:

  • Identifier URL = OpenID endpoint URL = IdP

  • The OpenID endpoint is not unique. It is the same for all end users of that endpoint.

  • Verified identifier URL = identity

  • Verified identifier URL is unique. It is associated to the endpoint user account.

  • https://www.google.com/accounts/o8/id is the Google OpenID endpoint URL.

  • https://www.google.com/accounts/o8/id?id=AltOawk... is the Google OpenID verified identifier URL.

  • The hash the Google OpenID identity URL contains is also related to the OpenID realm (the consumer domain namespace where this OpenID identifier stays valid). That is one of the reasons to not be just the username.

  • About how to provide the unique verified identifier URL, see here.

Still some things remain unclear to me:

  • What other reasons are there that Google uses for the hashed id; it could have also used id?u={username}&oidrealm={...}.

  • What is the reason to have such OpenID realm at all?

  • What exactly is the difference between identifier URL and claimed identifier URL?

Answer from Albert on Stack Overflow
Top answer
1 of 3
5

Ok, as I just have fixed my SMF OpenID endpoint implementation (read details about some very related problems I had here) where I made a few assumptions on those relations. Of course that doesn't prove them right (so please correct me). Here they are:

  • Identifier URL = OpenID endpoint URL = IdP

  • The OpenID endpoint is not unique. It is the same for all end users of that endpoint.

  • Verified identifier URL = identity

  • Verified identifier URL is unique. It is associated to the endpoint user account.

  • https://www.google.com/accounts/o8/id is the Google OpenID endpoint URL.

  • https://www.google.com/accounts/o8/id?id=AltOawk... is the Google OpenID verified identifier URL.

  • The hash the Google OpenID identity URL contains is also related to the OpenID realm (the consumer domain namespace where this OpenID identifier stays valid). That is one of the reasons to not be just the username.

  • About how to provide the unique verified identifier URL, see here.

Still some things remain unclear to me:

  • What other reasons are there that Google uses for the hashed id; it could have also used id?u={username}&oidrealm={...}.

  • What is the reason to have such OpenID realm at all?

  • What exactly is the difference between identifier URL and claimed identifier URL?

2 of 3
2

Here is my understanding. I am actually just answering the last two questions in your own answer. Hope someone finds these useful.

What is the reason to have such OpenID realm at all?

The realm is used for security. Basically the return_url is checked against the realm, and OpenID specs say they MUST match. Google has taken this one step further, and provides unique verified identifiers for each realm. They might have done as you suggested, and put the realm back in their identifier, but then you could tell by looking at two verified identifiers whether they were the same end-user or not. I think they are trying to keep their identifiers free of identifying information. (ironic, no?)

What exactly is the difference between identifier URL and claimed identifier URL?

The claimed identifier is the one the end-user has specified. This is not their unique identifier. Yahoo is a good example of this. They allow you to specify yahoo.com as your identifier, log into your yahoo account, and return a unique identifier to the openid consumer. This just simplifies the process for the end-user. (And increases the likelihood that they'll use yahoo.com as their openid!)

🌐
HubSpot
blog.hubspot.com › home › website › uri vs. url: what’s the difference?
URI vs. URL: What’s the Difference?
February 13, 2023 - There are two types of URIs: URNs and URLs. A uniform resource name (URN) is a persistent and location-independent identifier that follows the “urn” scheme.
🌐
The Trojan
apoorvtyagi.tech › nanoid-url-friendly-unique-id
Introducing a URL friendly unique identifier - NanoID
July 26, 2021 - It is a tiny, secure, URL-friendly, unique string ID generator.
🌐
TechTarget
techtarget.com › whatis › definition › URI-Uniform-Resource-Identifier
What is a Uniform Resource Identifier (URI)? | Definition from TechTarget
A URN does not state which protocol should be used to locate and access the resource. Instead, it labels the resource with a persistent, location-independent and unique identifier.
🌐
CodeGenes
codegenes.net › blog › what-is-the-difference-between-a-uri-a-url-and-a-urn
What is the Difference Between URI, URL, and URN? A Clear Technical Explanation — codegenes.net
URNs (Uniform Resource Names): URIs that specify a persistent, location-independent name for a resource. ... All URLs are URIs. All URNs are URIs. But not all URIs are URLs or URNs. A Uniform Resource Locator (URL) is a type of URI that goes beyond mere identification...
🌐
W3C
w3.org › Addressing › URL › uri-spec.html
Universal Resource identifiers in WWW
The fragment-id follows the URL of the whole object from which it is separated by a hash sign (#). If the fragment-id is void, the hash sign may be omitted: A void fragment-id with or without the hash sign means that the URL refers to the whole object. While this hook is allowed for identification of fragments, the question of addressing of parts of objects, or of the grouping of objects and relationship between continued and containing objects, is not addressed by this document.
🌐
Wikipedia
en.wikipedia.org › wiki › Uniform_Resource_Identifier
Uniform Resource Identifier - Wikipedia
5 days ago - For example, in the International Standard Book Number (ISBN) system, ISBN 0-486-27557-4 identifies a specific edition of the William Shakespeare play Romeo and Juliet. The URN for that edition would be urn:isbn:0-486-27557-4. However, it gives no information as to where to find a copy of that book. A Uniform Resource Locator (URL) is a URI that specifies the means of acting upon or obtaining the representation of a resource, i.e.
🌐
ScienceDirect
sciencedirect.com › topics › computer-science › resource-identifier
Resource Identifier - an overview | ScienceDirect Topics
A URN is assigned independently of a resource's location, and its syntax includes a namespace identifier and a namespace string, such as urn:isbn:1-55860-672-6. Unlike URLs, URNs do not provide a way to locate the resource on the web, but both URLs and URNs are global identifiers.
Find elsewhere
🌐
TechTarget
techtarget.com › searchnetworking › definition › URL
What is a URL (Uniform Resource Locator)? Definition from SearchNetworking
A URL (Uniform Resource Locator, also called a web address) is a unique identifier used to locate a resource on the internet.
🌐
Google Cloud
cloud.google.com › blog › products › api-management › api-design-choosing-between-names-and-identifiers-in-urls
API design: Choosing between names and identifiers in URLs | Google Cloud Blog
November 18, 2018 - Faced with these tradeoffs, which style of URL should you choose? The best response is not to choose: you need both to support a full range of function. Providing both styles of URL gives your API a stable identifier as well as the ease of use of hierarchical names.
🌐
Medium
paul-d-chuang.medium.com › uri-v-s-url-v-s-fqdn-54d3d140f49d
URI v.s. URL v.s. FQDN. URI: uniform resource identifier. | by Paul Chuang | Medium
August 7, 2024 - URNs serve to provide persistent, localtion-independent resource identifiers. ... 930-2-12-123409-0 is the namespace-specific string, which is the actual ISBN for a specific book. (regardless where the book is located physically or digitally) An FQDN is a complete domain name that specifies its exact location in the hierarchy of the Domain Name System (DNS). It includes all domain levels, including the top-level domain (TLD), and is unique across the internet. ... URL ...
Top answer
1 of 8
4

Generally with web-sites you're trying to make them easy to crawl and get access to all the information so that you can get good search rankings and drive traffic to your site. Good web developers design their HTML with search engines in mind, and often also provide things like RSS feeds and site maps to make it easier to crawl content. So if you're trying to make crawling more difficult by not using sequential identifiers then (a) you aren't making it more difficult, because crawlers work by following links, not by guessing URLs, and (b) you're trying to make something more difficult that you also spend time trying to make easier, which makes no sense.

If you need security then use actual security. Use checks of the principal to authorize or deny access to resources. Obfuscating URLs is no security at all.

So I don't see any problem with using numeric identifiers, or any value in trying to obfuscate them.

2 of 8
3

Using a hash like MD5 or SHA on the ID is not a good idea:

  • there is always the possibility of collisions. That is, two different IDs hash to the same value.
  • How are you going to unhash it back to the actual ID?

A better approach if you're set on avoiding incrementing IDs would be to use a GUID, or just a random value when you create the ID.

That said, if your application security relies on people not guessing an ID, that shows some flaws elsewhere in the system. My advice: stick to the plain and easy auto-incrementing ID and apply some proper access control.

🌐
GoDaddy
godaddy.com › home › posts › uri vs url: the main differences between url & uri
URI vs URL: the main differences between URL & URI - GoDaddy Resources - UAE English
October 11, 2024 - A URN is another type of URI that is used to identify a resource by its name. As mentioned above. a URN is a type of URI that identifies a resource by its name rather than its location.
🌐
Wikipedia
en.wikipedia.org › wiki › URL
URL - Wikipedia
1 week ago - Early WorldWideWeb collaborators, including Berners-Lee, originally proposed the use of UDIs: Universal Document Identifiers. An early (1993) draft of the HTML Specification referred to "Universal" Resource Locators. This was dropped some time between June 1994 and October 1994. In his book Weaving the Web, Berners-Lee emphasizes his preference for the original inclusion of "universal" in the expansion rather than the word "uniform", to which it was later changed, and he gives a brief account of the contention that led to the change. Every HTTP URL conforms to the syntax of a generic URI.
🌐
Crossref
eventdata.crossref.org › guide › data › ids-and-urls
IDs and URLs and the Web - Event Data User Guide
Whilst it's important to record exactly where we looked to find a particular link, it's also important that we represent content as consistently as possible. The above webpage has metadata indicating the canonical URL. When we identify a canonical URL we use this URL as the subj_id in the Event.
🌐
URL Decode
urldecoder.org › dec › id
URL Decoding of "id" - Online
Decode id from URL-encoded format with various advanced options. Our site has an easy to use online tool to convert your data.
🌐
ICANNWiki
icannwiki.org › URL
URL - ICANNWiki
The Absolute URL is a URL that is independent of other elements and points directly to an exact file location.