Well-known AG configuration directories
Robert Olson
olson at mcs.anl.gov
Fri Mar 7 12:40:59 CST 2003
I'd like to have the AG system define the following configuration
directories. I realize this is being done now, but these go toward
documenting & codifying current practice (and providing standard names).
Per-user configuration.
This will hold things like the user profile, defaults, and a user's
certificate repository.
Defaults:
Linux: $HOME/.AccessGrid
Windows has the notion of an Application Data directory. This can be
retrieved programmatically thusly:
from win32com.shell import shell, shellcon
appData = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
which on my machine is C:\Documents and Settings\olson\Application Data. I
think the AG diretcotry should be called <appdata dir>\Access Grid. A win
of using this directory is that the default permissions result in it being
unreadable to other users, which makes it a good place for private keys to
be stored. It may also be a good place for proxy certs to be stored, but if
roaming profiles are in use it might be a network drive, which isn't
necessarily a good thing.
Per-systemconfiguration.
This would hold the shared trusted CA repository, and whatever other
per-machine state makes sense.
Linux: somewhere under /usr/share maybe, wherever is standard.
Windows: there is a similar key CSIDL_COMMON_APPDATA that on my machine
points to C:\Documents and Settings\All Users\Application Data.
Per-service configuration.
This would hold the certificate repository for the service, and a trusted
CA dir if it is different than the per-machine one.
I suspect this is likely located in the per-machine configuration space
somewhere.
Temporary storage
This is for things like proxy certs. It needs to be local to the current
machine.
Linux: /tmp, if we get the naming unique (should be straithforward)
Windows: %TEMP% or win32api.GetTempPath().
We should also provide support for the creation of temporary filenames. The
Python library has the tempfile module; this may be sufficient; it appears
to use the %TEMP% setting on Linux. A Win32 APi mechanism for doing the
same thing is:
win32api.GetTempFileName(win32api.GetTempPath(), "AG")
API support
we should have API support for all of this. I propose:
Platform.GetUserConfigurationDir()
Platform.GetSystemConfigurationDir()
Platform.GetServiceConfigurationDir(serviceName)
Platform.GetTempDir()
properly done, this will get rid of some of the problems we've run into
with missing assumed directory names, etc.
--bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/ag-dev/attachments/20030307/454c2950/attachment.htm>
More information about the ag-dev
mailing list