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

  • Home
  • SEARCH
  • 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 1107971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:00:43+00:00 2026-05-17T02:00:43+00:00

I’m trying to make a web service secure. It’s not for a bank or

  • 0

I’m trying to make a web service secure.
It’s not for a bank or anything of that sort, but the organization using it may lose some money if the service will be used by someone not authorized (it’s hard to tell exactly how much..).

The purpose is not to allow unauthorized applications to use any method (other than “GetChallenge”. for users authentication there is a different mechanism which checks for username and password. I actually combined the two, but they serve different purposes):

So here’s what I do:
I send a (ASP.NET) session key (for everyone to read. ASP.NET’s session Is 15 randomly generated bytes, it lives for 20 minutes unless prolonged, and ASP.NET will not receive any request without it).
In my SignIn method, apart from username and password (which anyone can acquire, since it’s a part of a public site), I receive a third parameter – the session key hashed by md5 algorithm with 6 bytes as salt.
And only if the hash is correct (I’m hashing and comparing it on the server side) – I let the users sign in.
From then on in every method, I check if the user is signed in.

Added: The username and password are sent as clear text, and that’s not a problem (not the one I’m addressing at least). The problem is for someone (other than the company we’re working with) writing an application which uses my web service. The web service should only be used by an authorized application.
Also, the session id is sent back and forth with every request and response (as a part of ASP.NET session mechanism. That’s how ASP.NET knows to “track” a session specific for a user). Sorry for not clarifying that from the first place.
(irrationally thought it was obvious).

How strong and effective is that security strategy?

Thanks.

  • 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-17T02:00:44+00:00Added an answer on May 17, 2026 at 2:00 am

    Updated based on your edit and comment

    It’s pretty secure and is very similar to the approach used by Google, Facebook and others for their API keys. Except…

    Session ID plain text potential issue

    I would recommend against using Session ID as part of a security mechanism.

    The one issue is with passing the session key in plain text across the network. There is potential that this could open up some Session hijack and other attacks.

    From the Microsoft Docs:

    The SessionID is sent between the server and the browser in clear text, either in a cookie or in the URL. As a result, an unwanted source could gain access to the session of another user by obtaining the SessionID value and including it in requests to the server. If you are storing private or sensitive information in session state, it is recommended that you use SSL to encrypt any communication between the browser and server that includes the SessionID.

    As you are using the Session ID as part of your security mechanism I would say that is sensitive data.

    One way to ensure someone doesn’t get hold of your session key is to run your service on HTTPS. Personally I would avoid using the Session ID in this way and generating a non-related value instead.

    Recommended change

    Follow more closely the model used by Google and the like. Generate a new GUID for each application, store the GUID in a database on the server, pass the GUID in each request to your server from the client.

    Benfits:

    • Identifies the client application uniquely, allowing you to track and manage usage per client nicely
    • Easily disable any client by removing the GUID from your data store
    • No sensitive data on the wire

    I would still run the service on HTTPS as it’s easy to setup and gives the added benefit of protecting any other data you send to your service.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.