Im creating a host application (a game) which allows for users to supply a
custom computer AI. This will be in the form of a plugin assembly which
supports a specified interface. So the host will call interface functions in
the plugins like PerformMove(Gam eState gs). The host application is a
trusted application that runs on a server, and users upload plugins to this
server, but I can't trust the plugins.
PlugIn:
- Must adhere to a specific public interface.
- Is allowed to create and maintain private state information, to be used
between calls.
- Is not allowed access to I/O, Networks, Other processes, etc.
- Will recieve some objects by reference form the host, but has only read
capabilities on these objects. If this is not possible, it will recieve
objects by value only.
Host:
- Can kill any plugin process/thread that takes too long time.
- Can kill any plugin process/thread that takes too much memory (or maybe
limit the allowed memory size at creation of the plugin process?)
- In order to allow the host enough control over the plugin to be able to
kill it, I expect to have to run the plugin functions in a different thread
or process.
I'm pretty new to security, so how would you set up these plugins,
securitywise? 2 1419
The Code Access Security model of the .NET Framework allows you to do
this pretty easily. You will want to create a separate AppDomain to
load your plugin assemblies. You can specify limited permissions for
all code executing in the AppDomain. You then communicate with your
plugin code using .NET Remoting.
See the documentation for AppDomain.SetAp pDomainPolicy for a hint on how
to get started: http://msdn.microsoft.com/library/de...olicytopic.asp
Joshua Flanagan http://flimflan.com/blog
Jesper wrote: Im creating a host application (a game) which allows for users to supply a custom computer AI. This will be in the form of a plugin assembly which supports a specified interface. So the host will call interface functions in the plugins like PerformMove(Gam eState gs). The host application is a trusted application that runs on a server, and users upload plugins to this server, but I can't trust the plugins.
PlugIn: - Must adhere to a specific public interface. - Is allowed to create and maintain private state information, to be used between calls. - Is not allowed access to I/O, Networks, Other processes, etc. - Will recieve some objects by reference form the host, but has only read capabilities on these objects. If this is not possible, it will recieve objects by value only.
Host: - Can kill any plugin process/thread that takes too long time. - Can kill any plugin process/thread that takes too much memory (or maybe limit the allowed memory size at creation of the plugin process?) - In order to allow the host enough control over the plugin to be able to kill it, I expect to have to run the plugin functions in a different thread or process.
I'm pretty new to security, so how would you set up these plugins, securitywise?
Thanks. At first glance, it seems like just what I am looking for. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike |
last post by:
Apparently there is now a way to hide html source code. How it done?
For example see:
See http://www.eteamz.com/banksblaze/
|
by: Graham Ashton |
last post by:
Hi. I'm trying to edit C# code from within eclipse 2.1.1 but am getting
nowhere. The Improve plug-in doesn't seem to install on such recent
versions of eclipse; is there anything else out there that I could try?
Thanks,
Graham
|
by: Muhammad Aftab Alam |
last post by:
Hello All
is it possible to write plug-in for IIS with c#,
if so what path should I follow to get to what I want.
best regards
Muhammad Aftab Alam
|
by: Gary James |
last post by:
This may not be a direct C# question, but since I'll be using using C# for
development, I thought I'd pose the question here.
I'll soon be involved in the design of a new software product that will
employ a software "Plug-In" architecture. Taking the plug-in route will
give us a design that can adapt to, as yet, undefined future requirements
(within the scope of the plug-in interface spec of course). In the past
I've done this with...
|
by: TusharP |
last post by:
Hi,
Before asking my doubt, first I want to tell you about my application
structure. I want to design a Client Desktop program, which has an MDI form.
This MDi Form has one Horizontal Toolbar. Button of Toolbar get added
whenever it find Plug-in dlls in "Plug-In" directory. Now this Plug in dll
is nothing but form (child form of MDI form).
I want your help to sort this problem. i.e When MDi form create instance of
dll(form.dll) that form...
| |
by: Koichi |
last post by:
Hi, I'm now making a plug-in for a CG software. I embed
Python in a plugin and it works. The problem is that it
conflicts with other plugins that also embeds Python because it
runs in the same thread. I don't know when Py_Initialize() and
Py_Finalize() are executed because I don't know when user loads/unloads
a plugin that embeds Python. Is there any right way to embed
Python in a plug-in under the following conditions? If not, what...
|
by: DeveloperX |
last post by:
I've knocked up a quick plug in project (actually it's 6 projects, but
more on that in a moment).
This project is referenced by a shared add in (used for Excel).
The issue I have is that when I iterate through the DLL's in the plug
in's directory, when it finds my plug in dll it claims there are no
types in the assembly.
Assembly assembly = Assembly.LoadFile(pDllName);
|
by: JoderCoder |
last post by:
I have an application (the code is C++, platform VS 2003) which has a plug in for outlook (i also have the msi installation file for the program).
if i install the msi, outlook plug in will be inserted to outlook. but i have to debug it. if i run the application from the code itself, outlook addin wouldnt get inserted, only the rest of the application will work.
I am not familiar with plug in development. Any help/advise on how to debug...
|
by: -Lost |
last post by:
How should one write a plug-in interface?
I've tossed around several ideas but rudimentary ones at best. For
example:
Plug-In-A -Plug-In-Proxy -Application
The plug-in simply hands off its information such as author,
description, functions, parameters, et cetera to the proxy -- the
application then polls the proxy at runtime.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |