Re: Interface-based security?



You can use programmatic security. Construct a security
descriptor that allows access to Everyone and denies access
to the Network Users standard group. Then use the server
security interface IServerSecurity (via CoGetCallContext) to
impersonate the caller via IServerSecurity::ImpersonateClient.
Perform an AccessCheck() against your manually crafted
security descriptor. It will pass for all local callers and fail for
all network callers. Finally, call IServerSecurity::RevertToSelf.
You need this check called upon entry from each interface
method on the restricted interface, _except_ for the IUnknown
methods (!).

Here's a list of security functions you'd use to construct your
security descriptor:
InitializeAcl
CreateWellKnownSid (WinNetworkSid and WinWorldSid)
AddAccessDeniedAce
AddAccessAllowedAce
InitializeSecurityDescriptor
SetSecurityDescriptorDacl

Note that WinLocalSid alone won't fit the bill since it matches all
local accounts regardless of whether they are logged in locally
or remotely. It also excludes domain accounts logged locally.
You could use it in place of WinWorldSid if you specifically
want to exclude domain accounts even locally.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"jesse" <jessegarbage@xxxxxxxxx> wrote in message
news:1156347282.719263.321490@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want to create a DCOM server that allows some users to call certain
methods, and other users to call other methods. I will settle for a
compromise or workaround, but I'd like to know what others would do
here. Here's the situation:

I have a COM object hosted in a service. It serves as a database--the
client applications need to access about 40 GB of data at random, speed
is of the essence. The service runs on a box that has over 100 GB of
memory, so this works. The com object uses the
DECLARE_CLASSFACTORY_SINGLETON() macro, so all clients are talking to
the same instance. One client modifies/writes data, other clients only
read data. The object serves the client applications perfectly. Since
this all runs on a secure machine, remote access is disabled in DCOM
config, and that's that.

This has all been working perfectly until now. Now I need other
machines to be able to read data from this server. Ideally, I'd like
to break off methods like WriteData() into a separate interface, called
IDataWriter and have that interface not accessible from the remote
clients.

I've considered overriding QueryInterface and return E_FAIL if the
client is remote, but I don't know how to determine if it's remote or
local. Also, I'm not sure if this is a safe approach.

Any suggestions?

TIA,
Jesse



.



Relevant Pages

  • Re: Active Directory/HIPPA Question
    ... The client ... > roll out AD when their top priority this year is securing the applications ... Security is one of the biggest reasons. ... ESPECIALLY if you have 800 remote offices. ...
    (microsoft.public.win2000.general)
  • Re: remote control program
    ... The security of the interface has nothing to do with SSL. ... the security of your online banking technology also has nothing to do with SSL. ... If the technology was not properly assessed by a qualified security team then I wouldn't trust it. ... for remote work to the same location who complains about jitter and delay ...
    (Security-Basics)
  • Re: RMA Datashare Poll
    ... and speed is mediocre but it's nearly a universal protocol ... > and there's a client for every OS in existence. ... > 2) Web based interface - A cgi style upload/download interface with ... and can be run through https for heightened security. ...
    (rec.martial-arts)
  • Re: Pre Dev Q - Please
    ... > this to understand that if a user to connect to the server that they would ... Using X does not mean necessarily using a browser interface. ... Security of data on the server, and on the client machine, is ...
    (comp.os.linux.questions)
  • Re: Active Directory/HIPPA Question
    ... roll out AD when their top priority this year is securing the applications ... Security is one of the biggest reasons. ... ESPECIALLY if you have 800 remote offices. ... >> I have a potential client who is mulling whether or not to invest a ton ...
    (microsoft.public.win2000.general)