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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:06:03+00:00 2026-05-13T07:06:03+00:00

What I want to do is implement some basic security by checking not only

  • 0

What I want to do is implement some basic security by checking not only what class has called a particular method, but also, which instance of that class.

I tried

StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();

but that obviously only gives me the class name. The problem with allowing/requiring the callers to send self, or personal IDs is that all the callers are required to have access to the details of all the others. Can anyone help?

EDIT: More information:

So we have a server which makes connections with several agents. The agents send packets of information which include the name they CLAIM to have. There is a special agent which decides whether or not people should be able to lie about this in each particular case.

The agents make connections to instances of an Agent class on the server, but there is also a possibility that some agents will run natively. The reason I’m interested in this approach is that I will need that technique later (extract the specific instance that called a given method)

I hope this is better, and sorry for not putting enough info before :/

  • 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-13T07:06:03+00:00Added an answer on May 13, 2026 at 7:06 am

    This whole line of attack can’t possible secure anything. If users can control the code that runs, they can just run a codegen library and edit your code. If users can’t control the code, then this is all unnecessary.

    If you can’t resist this urge, one approach is to wrap everything in Proxies that communicate the information you need.

    By Proxy, I mean java.lang.reflect.Proxy. That is, wrap every one of these objects in a proxy. The proxy’s job would be to store away this on a stack of your own that the callees could consult.

    This is essentially AOP (aspect oriented programming) reinvented, so you might want to read about that. Look at the Spring framework.

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

Sidebar

Related Questions

I want to implement a basic login system in some PHP app where no
I want to implement some basic tracing in a simple c# (WPF) application that
We want to implement a sitemap.xml feature in out CMS system. There is some
I want implement in my software solution an VBA editor but in c# 3.0.
given this class definition: public class Frame { IFrameStream CapturedFrom; } I want implement
Microsoft has announce that WindowsLiveID become a OpenID provider . I want implement it
I want to implement in Java a class for handling graph data structures. I
I'm developing a simple site for local student contest. I want to implement some
I am attempting to implement some very basic debugger protection to prevent kids from
I have the following problem: Suppose I have some basic counter class Counter .

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.