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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:58:37+00:00 2026-06-17T15:58:37+00:00

Setup We’re developing a distributed application with Java and Spring where our existing client

  • 0

Setup

We’re developing a distributed application with Java and Spring where our existing client front end (complete with its own authentication, database, accounts, etc.) uses REST calls to access our new server for additional services. We want to protect these resources with Oauth.

Access should be restricted by role or account. However we don’t want the user on the client side to have to worry about any additional authentication apart from the already existing account. At the same time we need to provide a means for third party applications to access some resources from the outside after going through some kind of registration against the server (which is why we’re distributing in the first place).

So we have set up spring security on the server side to provide accounts that should be used to restrict access to the resources. The user should log in on the client side and then be able to access only those server resources assigned to him. We have some kind of registration process that sets up the user on the client side to be able to access the server services so any account setup I think should be done there.

So the questions are

How can I enable the client side to obtain an access token for the protected resources without the user having to log in to his server-side account?

And how do I setup the server side account without needing any user input?

My thoughts

This won’t do

I’m thinking I’ll have to either tell the client about a new account created on the server side for that user (but then, how would I choose and communicate a password?) or synchronize the client side account to the server, and use those credentials to authenticate the client against the server and generate access tokens. But how save can that be? Also the server has a much higher security (one way encrypted, salted passwords) on its accounts and I don’t really want to compromise this by using the less save client accounts.

Maybe this will?

Maybe the way to go will be to tell the server about the client account during the first authentication, create an account on the server side, store the generated token on the client side and then authenticate the client against the server with that token for each subsequent request..? Will the server be able to log-in the client using its server-side account via that token for each request?
I’d need a special resource for that initial (2-legged?) handshake that can only be accessed from the client server, right?

Also:
Which would be better suited for the task, OAuth 1 or 2?

I’m hoping someone understands my problem and can help me sort through possible missunderstandings and knowledge gaps (I’m reading through Oauth and spring security documentations right now, so I’ll update if I come up with a clearer picture and thus clearer questions of what to do)

Thanks for any help!

  • 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-06-17T15:58:38+00:00Added an answer on June 17, 2026 at 3:58 pm

    So our current status is to use OAuth2 mostly for reasons of simplicity. We’re also sure that the flaws it might have concerning security we can cover ourselves as needed and they will most likely be addressed in the future by the implementation vendors or the IETF.

    To handle the communication between REST server and REST client (both in our control) we use the formerly known as 2-legged authentication, now client credentials grant. I’ve asked a few questions on SO about that including

    • our current spring-security context setup
    • the client credentials flow in particular
    • the use of long lived tokens versus reauthentication
    • and how to limit REST access by HTTP method

    Concerning the use of client based user accounts for authentication against the server we didn’t get any further.

    For now we authenticate the user against our old client web application as before and then authenticate the client against the server 2-legged. In theory this will allow any user to access any resource using the client accesstoken but for now that’s okay for us so we will not investigate further down that road.

    Still, should anyone have a good idea on how this might be solved we’ll pick it up, just to tighten security further. So, I’ll leave this question open.

    My thoughts currently are along the line of registering a new client ID for each user on the authentication server with a generated secret and then synchronize those back to the client server and use those client_id / secret combinations to access resources for a user represented by the generated client_id in a client credentials flow.

    For our latest application we’ll store accounts on the REST server (authentication provider) and have the user login against that server and then use the token to access the REST resources as intended by the spec.

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

Sidebar

Related Questions

Setup: an online tv channel with youtube like clips and categories our own flash
Setup: I'm creating a .NET WinForms application in C# to allow our technical support
Setup: Grails 1.1, Acegi/Spring Security plug-in I want users to log in over SSL,
Setup: I am creating a module so that my clients can manage their own
Setup: Hibernate 4.0 (JPA 2.0), Java EE 6 I have the following problem: I
Setup: iMac 10.6.8, Apache Tomcat 6.0.16, eXist DataBase, JSP, Java, XML I have a
Setup: ICEfaces 1.8.2, Java EE 5, JSF 1.2. I'm using an ice:inputFile tag to
Setup: I have client C connecting to server S Both C and S are
SETUP: Using Google Apps Script's UI (doGet) with tabPanel option. At the bottom of
Setup: A--< B >-- C . On A there is a RFS on B,

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.