Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6356697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:01:03+00:00 2026-05-24T23:01:03+00:00

What does RESTful Authentication mean and how does it work? I can’t find a

  • 0

What does RESTful Authentication mean and how does it work? I can’t find a good overview on Google. My only understanding is that you pass the session key (remeberal) in the URL, but this could be horribly wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:01:03+00:00Added an answer on May 24, 2026 at 11:01 pm

    How to handle authentication in a RESTful Client-Server architecture is a matter of debate.

    Commonly, it can be achieved, in the SOA over HTTP world via:

    • HTTP basic auth over HTTPS;
    • Cookies and session management;
    • Token in HTTP headers (e.g. OAuth 2.0 + JWT);
    • Query Authentication with additional signature parameters.

    You’ll have to adapt, or even better mix those techniques, to match your software architecture at best.

    Each authentication scheme has its own PROs and CONs, depending on the purpose of your security policy and software architecture.

    HTTP basic auth over HTTPS

    This first solution, based on the standard HTTPS protocol, is used by most web services.

    GET /spec.html HTTP/1.1
    Host: www.example.org
    Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
    

    It’s easy to implement, available by default on all browsers, but has some known drawbacks, like the awful authentication window displayed on the Browser, which will persist (there is no LogOut-like feature here), some server-side additional CPU consumption, and the fact that the user-name and password are transmitted (over HTTPS) into the Server (it should be more secure to let the password stay only on the client side, during keyboard entry, and be stored as secure hash on the Server).

    We may use Digest Authentication, but it requires also HTTPS, since it is vulnerable to MiM or Replay attacks, and is specific to HTTP.

    Session via Cookies

    To be honest, a session managed on the Server is not truly Stateless.

    One possibility could be to maintain all data within the cookie content. And, by design, the cookie is handled on the Server side (Client, in fact, does even not try to interpret this cookie data: it just hands it back to the server on each successive request). But this cookie data is application state data, so the client should manage it, not the server, in a pure Stateless world.

    GET /spec.html HTTP/1.1
    Host: www.example.org
    Cookie: theme=light; sessionToken=abc123
    

    The cookie technique itself is HTTP-linked, so it’s not truly RESTful, which should be protocol-independent, IMHO. It is vulnerable to MiM or Replay attacks.

    Granted via Token (OAuth2)

    An alternative is to put a token within the HTTP headers so that the request is authenticated. This is what OAuth 2.0 does, for instance. See the RFC 6749:

     GET /resource/1 HTTP/1.1
     Host: example.com
     Authorization: Bearer mF_9.B5f-4.1JqM
    

    In short, this is very similar to a cookie and suffers to the same issues: not stateless, relying on HTTP transmission details, and subject to a lot of security weaknesses – including MiM and Replay – so is to be used only over HTTPS. Typically, a JWT is used as a token.

    Query Authentication

    Query Authentication consists in signing each RESTful request via some additional parameters on the URI. See this reference article.

    It was defined as such in this article:

    All REST queries must be authenticated by signing the query parameters
    sorted in lower-case, alphabetical order using the private credential
    as the signing token. Signing should occur before URL encoding the
    query string.

    This technique is perhaps the more compatible with a Stateless architecture, and can also be implemented with a light session management (using in-memory sessions instead of DB persistence).

    For instance, here is a generic URI sample from the link above:

    GET /object?apiKey=Qwerty2010
    

    should be transmitted as such:

    GET /object?timestamp=1261496500&apiKey=Qwerty2010&signature=abcdef0123456789
    

    The string being signed is /object?apikey=Qwerty2010&timestamp=1261496500 and the signature is the SHA256 hash of that string using the private component of the API key.

    Server-side data caching can be always available. For instance, in our framework, we cache the responses at the SQL level, not at the URI level. So adding this extra parameter doesn’t break the cache mechanism.

    See this article for some details about RESTful authentication in our client-server ORM/SOA/MVC framework, based on JSON and REST. Since we allow communication not only over HTTP/1.1, but also named pipes or GDI messages (locally), we tried to implement a truly RESTful authentication pattern, and not rely on HTTP specificity (like header or cookies).

    Later Note: adding a signature in the URI can be seen as bad practice (since for instance it will appear in the http server logs) so it has to be mitigated, e.g. by a proper TTL to avoid replays. But if your http logs are compromised, you will certainly have bigger security problems.

    In practice, the upcoming MAC Tokens Authentication for OAuth 2.0 may be a huge improvement in respect to the "Granted by Token" current scheme. But this is still a work in progress and is tied to HTTP transmission.

    Conclusion

    It’s worth concluding that REST is not only HTTP-based, even if, in practice, it’s also mostly implemented over HTTP. REST can use other communication layers. So a RESTful authentication is not just a synonym of HTTP authentication, whatever Google answers. It should even not use the HTTP mechanism at all but shall be abstracted from the communication layer. And if you use HTTP communication, thanks to the Let’s Encrypt initiative there is no reason not to use proper HTTPS, which is required in addition to any authentication scheme.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of any publicly available RESTful services that can be used for
Does anyone have any recommendations of tools that can be of assistance with moving
Does anyone use have a good regex library that they like to use? Most
Does anyone know of a good screencast, walkthrough or tutorial for creating WCF Restful
Does a firewall running on a machine only block stuff from outside that machine,
Does Restful Webservices have any service registries like the UDDI? Or can UDDI hold
In Restful Authentication, lib/authenticated_system.rb , why does current_user do a login_from_basic_auth , which does
I want to ask how can i see what xml does the WCF RESTful
Reading this: http://guides.rubyonrails.org/routing.html#adding-more-restful-actions What does it mean to add a 'member route'? or do
How can I make a controller restful when it does not have a model?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.