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 4624030
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:04:21+00:00 2026-05-22T03:04:21+00:00

I am beginning to believe I am a grossly incompetent programmer. After a lot

  • 0

I am beginning to believe I am a grossly incompetent programmer. After a lot of reading, I still cannot figure out how to cleanly implement an authentication mechanism for a RESTful WCF Service.

I have tried everything:

  1. Following this guide, only to find out that the proposed authentication mechanism is a ugly hack.

  2. Installing the WCF REST Starter Kit, only to find out it is obsolete and has been replaced with another project template.

  3. Install said project template, only to find out it does not provide any authentication mechanism of its own.

  4. Install an IIS module that provides custom authentication functionality at transport level, only to find out the author provides zero documentation. only to find out I need to implement a MembershipProvider. (I want to provide only an UserNamePasswordValidator.)

Is there any sane way to implement an authentication mechanism for a RESTful WCF Service?

  • 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-22T03:04:22+00:00Added an answer on May 22, 2026 at 3:04 am

    When I was investigating how to implement security for my own WCF RESTful service I spent some time looking at how other popular services like flickr and amazon implement their own security – assuming that they’ve probably spent far more time thinking about it than I have. Flickr’s documentation in particular helped shaped how I formated my signatures and requests.

    In the end I chose a HMAC (Hash-based Message Authentication Code) authentication scheme for my services.

    I created a custom HMAC ServiceAuthorizationManager that validates the signature of each request as it comes in. Each request contains the following:

    • a user token
    • timestamp
    • nonce
    • signature

    Using this information the manager can look up the user’s secret from their token and can recreate the signature on the server using the provided information.

    My signature consists of an MD5 hash of the following (values are concatenated together in a specific order and hashed so the value can be repeated on the server):

    • apikey
    • userToken
    • secret
    • timestamp
    • nonce

    I store the nonce’s in a memcache instance for a short period of time in order to quickly check against any replay attacks. After that time skew (about 10 minutes) the timestamp is used to reject any other old requests.

    I can post some snippets of my code if it will help. In general I’ve found that the HMAC authentication is generally the safest way to go and is easily supported on any clients that will be using your service (not just .NET).

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

Sidebar

Related Questions

Often when beginning a new project, I start out with what I believe to
I am beginning to believe that unit testing high level, well-written code, which requires
I'm reading Ivor Horton's Beginning Programming Visual C++ 2010, and I'm at Chapter 10-The
I'm a beginning python programmer, and I'd like someone to clarify the following behavior.
I believe the title is pretty self-explanatory but still, maybe, I should ask in
Beginning in Scala and reading about Either I naturally comparing new concepts to something
Since beginning to use VB.NET some years ago I have become slowly familiar with
I'm beginning a large scale javascript application with Marionette. A Marionette application has a
I am a beginning at nhibernate and I am trying to connect to a
I am beginning Facebook App development and am following the Recipe Box App Tutorial

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.