Path: blob/main/crypto/krb5/src/windows/installer/wix/msi-deployment-guide.txt
34914 views
1Kerberos for Windows23MSI Deployment Guide45----------------------------------------------------------------------67Contents891. Introduction101.1 Requirements111.2 Authoring a Transform122. Configuration Options132.1 Configurable Properties142.1.1 Setting Properties152.1.2 Leash GUI Properties162.1.3 Leash DLL Properties172.1.4 Kerberos IV Properties182.1.5 Kerberos V Properties192.2 Existing Registry Entries202.3 Replacing Configuration Files213. Network Identity Manager Settings223.1 Common Settings for NetIDMgr233.1.1 General Settings243.1.2 Common Plug-in Settings253.1.3 Settings for the Kerberos 5 Credentials Provider Plug-in263.1.4 Settings for the kerberos 4 Credentials Provider Plug-in274. Additional Resources285. Upgrades296. FAQ3031----------------------------------------------------------------------32331. Introduction3435Beginning with "Kerberos for Windows" version 2.6.5, a MSI installer36option is available for those who wish to use "Windows Installer"37for installing Kerberos and for organizations that wish to deploy38Kerberos through Group Policy.3940This document provides a guide for authoring transforms used to41customize the MSI package for a particular organization. Although42many settings can be deployed via transforms, in an Active43Directory environment it is advisable to deploy registry settings44and configuration files through group policy and/or startup45scripts so that machines where "Kerberos for Windows" is already46installed will pick up these customizations.47481.1 Requirements4950The information in this document applies to MSI packages51distributed with "Kerberos for Windows" releases from 2.6.5 and52onwards or MSI packages built from corresponding source53releases. Not all releases support all the configuration options54documented here.5556Authoring a "Windows Installer" transform requires additional57software for editing the MSI database tables and generating the58transform from the modified MSI package. ORCA.EXE and MSITRAN.EXE59which are included in the Windows Platform SDK ("Windows Installer"60SDK) can be used for this purpose.6162For reference, the schema for the MSI package is based on63SCHEMA.MSI distributed with the Platform SDK.6465For general information about "Windows Installer", refer to :6667http://msdn.microsoft.com/library/en-us/msi/setup/windows_installer_start_page.asp6869For general information about authoring MSI transforms, refer to :7071http://msdn.microsoft.com/library/en-us/msi/setup/transforms.asp7273The remainder of this document assumes some familiarity with74authoring transforms. While the MSDN documentation for Windows75Installer is a bit dense, it is recommended that you read through76the guide on MSI transforms found at the second link above. Also77MSDN includes a step-by-step example for creating a transform at:7879http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp80811.2 Authoring a Transform8283Transforms describe a set of modifications to be performed on an84existing MSI for the purpose of customizing it. This is85ordinarily done by making a copy of the MSI to be customized,86modifying the copy and then using the old and the new MSI to87generate a transform.8889E.g:90> copy kfw.msi kfw-modified.msi9192(edit the kfw-modified.msi to include the necessary changes)9394> msitran -g kfw.msi kfw-modified.msi kfw-transform.mst9596(generates kfw-transform.mst, which is the transform)9798Transforms have an extension of .mst. 'msitran' is a tool99distributed as part of the "Windows Installer" SDK (which in turn is100a part of the Windows Platform SDK).101102You can test a transform by :103104> copy kfw.msi kfw-test.msi105> msitran -a kfw-transform.mst kfw-test.msi106107and then checking the resulting kfw-test.msi to see if all the108changes you have made above to kfw-modified.msi is present in109kfw-test.msi. 'msitran' will complain if some modification in the110transform can not be successfully applied.111112As mentioned above, you can use a tool like ORCA.EXE to edit the113MSI databases directly when editing kfw-modified.msi. More114details are given below.115116----------------------------------------------------------------------1171182. Configuration Options119120The logic necessary to implement all of the settings described in121the release notes are present in the MSI. Most of these can be122controlled by setting the corresponding properties to the desired123value. Some settings may require modifying existing registry124entries (though not recommended) or adding new resources (like125files or registry keys). Instructions for performing these tasks126are below.1271282.1 Configurable Properties129130Most configurable properties correspond to registry keys or131values. Please refer to the release notes for more information132about how these registry settings are used.133134Due to the logic invoked based on the existence of these registry135keys or values, they are only set if the associated property is136defined to have a non null value. If the associated property is137not defined in the MSI, the registry key or value will not be138touched. By default, the MSI does not contain these properties139and hence will not set the registry keys. You will need to add140properties as needed to the MSI.141142When one of the configurable properties is set, the installer will143use the property value to set the corresponding setting in the144HKEY_LOCAL_MACHINE registry hive. HKEY_CURRENT_USER hive is not145touched by the installer.146147For each property, the associated registry setting is referenced148by the same text used in the release notes ('Registry and149Environment Settings' section).150151Strings are quoted using single quotes (e.g. 'a string'). An empty152string is denoted as ''. Note that you can't author null values153into the 'Property' table.154155Numeric values should be authored as decimal strings.1561572.1.1 Setting Properties158159In order to set a property,160161a. Open the MSI in ORCA.EXE162163b. Select the 'Property' table from the list of tables on the left.164165c. Find the property in the list of properties on the right,166double click the value and type the new value.167168d. If the property does not exist in the property list, right169click the list and select 'Add Row', type the property name170and the desired value.1711722.1.2 Leash GUI properties173174LEASHCREATEMISSINGCONFIG175Setting: automatic generation of missing configuration files176Values : '0' or '1'177178LEASHAUTORENEWTICKETS179Setting: automatic ticket renewal180Values : '0' or '1'1811822.1.3 Leash32 DLL properties183184LEASHLIFETIME185Setting: default lifetime (minutes)186Values : numeric187188LEASHRENEWTILL189Setting: default renew till time (minutes)190Values : numeric191192LEASHRENEWABLE193Setting: default renewable tickets setting194Values : '0' or '1'195196LEASHFORWARDABLE197Setting: default forwardable tickets setting198Values : '0' or '1'199200LEASHNOADDRESSES201Setting: default addressless tickets setting202Values : '0' or '1'203204LEASHPROXIABLE205Setting: default proxiable tickets setting206Values : '0' or '1'207208LEASHPUBLICIP209Setting: default public ipv4 address210Values : numeric211212LEASHHIDEKINITOPTIONS213Setting: hide advanced kinit options in dialog214Values : '0' or '1'215216LEASHLIFEMIN217Setting: minimum kinit dialog lifetime218Values : numeric219220LEASHLIFEMAX221Setting: maximum kinit dialog lifetime222Values : numeric223224LEASHRENEWMIN225Setting: minimum kinit dialog renew till time226Values : numeric227228LEASHRENEWMAX229Setting: maximum kinit dialog renew till time230Values : numeric231232LEASHUPPERCASEREALM233Setting: upper case realm234Values : '0' or '1'235236LEASHTIMEHOST237Setting: timesync host238Values : string239240LEASHPRESERVEKINITOPTIONS241Setting: Preserve ticket initialization dialog options242Values : numeric2432442.1.4 Kerberos 5 properties245246KRB5CONFIG247Setting: location of krb5.ini248Values : string249250KRB5CCNAME251Setting: Default credentials cache name252Values : string253254KRB5PRESERVEIDENTITY255Setting: MSLSA: credential cache client principal identity generation256Values : '0' or '1'2572582.2 Existing Registry Entries259260You can change existing registry values subject to the261restrictions mentioned in the Windows Platform SDK. Pay special262attention to component keypaths and try to only change the 'Value'263column in the 'Registry' table. If you want to add additional264registry keys please refer to section 3 (Additional Resources).2652662.3 Replacing Configuration Files267268The Kerberos configuration files (krb5.ini, krb.con, krbrealm.con)269can be replaced by your own configuration files. These files are270contained in separate MSI components so that you can disable them271individually.272273The recommended method for replacing these files is to first274disable the components containing the configuration files that you275want to replace, and then add new components for the replacement276files. This is outlined below (assuming you are using ORCA.EXE to277author the transform).278279Note that transforms are not a good way to add a new file as an280embedded stream. The method outlined here places the file in the281same directory as the MSI for deployment.282283The walkthrough below is to add a custom 'krb5.ini' file.2842851) Disable the component that contains the configuration file that286you want to replace.2872881.1) Locate and select the 'Component' table in the 'Tables'289list.2902911.2) In the Component table, locate the component you need to292change ( Ctrl-F invokes the 'Find' dialog). The component293names are listed below in section 2.3.1. For this294example, the component name is 'cmf_krb5_ini'.2952961.3) Go to the 'Condition' column of the component.2972981.4) Enter a condition that evaluates to299false. I.e. 'DONOTINSTALL'. (Note that an undefined300property always evaluates to false).301302Note that you can also use this step to disable other303configuration files without providing replacements.3043052) Add a new component containing the new configuration file.3063072.1) Select the 'Component' table in the 'Tables' list.3083092.2) Select 'Tables'->'Add Row' (Ctrl-R).3103112.3) Enter the following :312313Component : cmf_my_krb5_ini314ComponentId : {835BAAC6-5E54-BFFE-DBCB2F240711}315Directory_ : WindowsFolder316Attributes : 144317Condition :318KeyPath : fil_my_krb5_ini319320Note that the ComponentId is an uppercase GUID. You can321generate one using GUIDGEN.EXE or UUIDGEN.EXE, both of322which are included in the Platform SDK.323324The Attributes value of 144 is a sum of325msidbComponentAttributesPermanent (16) and326msidbComponentAttributesNeverOverwrite (128). This327ensures that local modifications are not overwritten or328lost during an installation or uninstallation. These are329the same settings used on the default configuration files.330331'fil_my_krb5_ini' is a key into the 'File' table which we332will fill later.3333343) Add a new feature to hold the new component.3353363.1) Select the 'Feature' table.3373383.2) Add a new row (Ctrl-R or 'Tables'->'Add Row') with the339following values:340341Feature : fea_my_krb5_ini342Feature_Parent: feaKfwClient343Title :344Description :345Display : 0346Level : 30347Directory_ :348Attributes : 8349350It is important to create the new feature under the351'feaKfwClient' feature, which will ensure that the352configuration file will be installed when the client353binaries are installed.354355Setting 'Display' to 0 will hide this feature from the356feature selection dialog during an interactive357installation. A value of 30 for 'Level' allows this358feature to be installed by default (on a 'Typical'359installation).360361The 'Attributes' value is362msidbFeatureAttributesDisallowAdvertise (8), which is set363on all features in the KfW MSI. The KfW MSI is not364designed for an advertised installation.3653664) Join the component and the feature.3673684.1) Select the 'FeatureComponents' table.3693704.2) Add a new row with the following values:371372Feature : fea_my_krb5_ini373Component : cmf_my_krb5_ini3743755) Add an entry to the 'File' table.3763775.1) Select the 'File' table.3783795.2) Add a new row with the following values:380381File : fil_my_krb5_ini382Component_ : cmf_my_krb5_ini383FileName : krb5.ini384FileSize : (enter file size here)385...386Attributes : 8192387Sequence : 1000388(leave other fields blank)389390The 'Attributes' value is msidbFileAttributesNonCompressed391(8192). This is because we will be placing this file in392the same directory as the MSI instead of embedding the393file in it. Transforms do not support updating compressed394sources or adding new cabinet streams.395396Finally, the 'Sequence' value of 1000 will be used later397to distinguish the file as being in a separate source398location than the other files in the MSI.3994006) Set a media source for the file.4014026.1) Select the 'Media' table.4034046.2) Add a row with the following values :405406DiskId : 2407LastSequence : 1000408...409(leave other fields blank)410411The sequence number of 1000 designates this as the media412source for the newly added file.4134142.3.1 Components for Configuration Files415416krb5.ini : 'cmf_krb5_ini' (ID {C1AF0670-BBF1-4AA6-B2A6-6C8B1584A1F4})417krb.con : 'cmf_krb_con' (ID {5391A051-CF14-45FF-BF64-CEE78A7A90C2})418krbrealm.con: 'cmf_krbrealm_con' (ID {D667B54F-1C98-43FB-87C6-0F0517623B90})419420----------------------------------------------------------------------4214223. Network Identity Manager Settings423424Configuration options for Network Identity Manager (NetIDMgr) are425stored in the Windows registry. Each option can exist in the user426registry hive or the machine registry hive or both. The value427defined in the user hive always overrides the value defined in the428machine registry hive.429430All registry keys used by NetIDMgr exist under the key431'Software\MIT\NetIDMgr' under the user and machine hive.432Deploying a specific configuration option can be achieved by433setting the corresponding registry value either by authoring the434keys into the MSI via a transform or by deploying a registry based435Group Policy Object. For deployment purposes, it is advisable to436deploy values to the machine hive instead of the user hive.437Deploying per user settings via the MSI is not supported at this438time.4394403.1 Common settings for NetIDMgr441442The following sections describe a partial list of options that can443be specified for NetIDMgr. Each set of options is described as a444set of registry values. Each section is preceded by the registry445key under which the values of that section must be specified.4464473.1.1 General settings448449Registry key : 'Software\MIT\NetIDMgr\CredWindow'450--------------451452Value : AllowAutoRenew453Type : DWORD (Boolean)454Default : 1455456Enables automatic credential renewal.457458459Value : AllowCritical460Type : DWORD (Boolean)461Default : 1462463Enables critical warning notifications.464465466Value : AllowWarn467Type : DWORD (Boolean)468Default : 1469470Enables warning notifications.471472473Value : AutoDetectNet474Type : DWORD (0 or 1)475Default : 1476477If '1', automatically detects network connectivity changes.478Network connectivity change notifications are then sent out to479individual plug-ins which can perform actions such as renewing480credentials or obtaining new credentials.481482483Value : AutoImport484Type : DWORD (0 or 1)485Default : 1486487If '1', imports credentials from the Windows LSA cache when488NetIDMgr starts.489490491Value : AutoInit492Type : DWORD (0 or 1)493Default : 0494495If this value is '1', shows the new credentials dialog if496there are no credentials when NetIDMgr starts.497498499Value : AutoStart500Type : DWORD (0 or 1)501Default : 0502503Start NetIDMgr when Windows starts504505506Value : AutoRenewThreshold507Type : DWORD (seconds)508Default : 600509510Specifies the time period before credential expiration that will511trigger a credential renewal. Requires AllowAutoRenew to be enabled.512513514Value : CriticalThreshold515Type : DWORD (seconds)516Default : 300517518Specifies the time period before credential expiration that will519trigger the second and final warning balloon. Requires AllowCritical520to be enabled.521522523Value : DefaultAllowAutoRenew524Type : DWORD (Boolean)525Default : 1526527Specifies the Default AllowAutoRenew value for new identities.528529530Value : DefaultSticky531Type : DWORD (0 or 1)532Default : 1533534If '0', new identities will not be pinned to the display by default.535If '1', new identities will be pinned to the display by default.536537538Value : DefaultWindowMode539Type : DWORD (0 or 1)540Default : 1541542If '0', Advanced mode is used543If '1', Basic mode is used544545Value : DestroyCredsOnExit546Type : DWORD (0 or 1)547Default : 0548549If '1', all credentials will be destroyed when NetIDMgr exits.550551Value : KeepRunning552Type : DWORD (0 or 1)553Default : 1554555If '1', when NetIDMgr application is closed, it will continue556to run in the Windows System Notification Area (System Tray).557The application can be exited by choosing the 'Exit' menu558option. If '0', closing the application will cause it to559exit completely.560561Value : LogToFile562Type : DWORD (0 or 1)563Default : 0564565If '1', debugging information is logged to %TEMP%\nidmdbg.log566567568Value : NotificationAction569Type : DWORD (50008 or 50025)570Default : 50025571572If '50025', the default notification icon menu action will be to573Show the Network Identity Manager application windows.574If '50008', the default notification icon menu action will be to575display the Obtain New Credentials dialog.576577578Value : RefreshTimeout579Type : DWORD (seconds)580Default : 60581582Specifies how often the credential list is refreshed.583584585Value : RenewAtHalfLife586Type : DWORD (Boolean)587Default : 1588589Enables the use of a half-life algorithm for credential renewals.590591592Value : WarnThreshold593Type : DWORD (seconds)594Default : 900595596Specifies the time period before credential expiration that will597trigger the first warning balloon. Requires AllowWarn to be enabled.5985996003.1.2 Common Plug-in settings601602Registry key : 'Software\MIT\NetIDMgr\PluginManager\Plugins\<plug-in name>'603--------------604605The '<plug-in name>' is one of the following for the standard plug-ins :606607Krb5Cred : Kerberos 5 credentials provider608Krb5Ident: Kerberos 5 Identity provider609610Consult the vendors for the plug-in names of other third party611plug-ins. Additionally, the plug-ins configuration panel in the612NetIDMgr application provides a list of currently registered613plug-ins.614615Value : Disabled616Type : DWORD (0 or 1)617Default : 0618619If '1', the plug-in will not be loaded.620621Value : NoUnload622Type : DWORD (0 or 1)623Default : 0624625If '1', the plug-in will not be unloaded from memory when the626NetIDMgr application exits or if the plug-in is stopped. The627plug-in binary will remain loaded until NetIDMgr terminates.6286293.1.3 Settings for the Kerberos 5 credentials provider plug-in630631Registry key : 'Software\MIT\NetIDMgr\PluginManager\Plugins\Krb5Cred\Parameters'632--------------633634Value : AutoRenewTickets635Type : DWORD (0 or 1)636Default : 1637638If '1', automatically renews expiring tickets. The thresholds639at which renewals happen are controlled in general NetIDMgr640settings.641642Value : CreateMissingConfig643Type : DWORD (0 or 1)644Default : 0645646If '1', creates any missing configuration files.647648Value : MsLsaList649Type : DWORD (0 or 1)650Default : 1651652If '1', includes credentials from the MSLSA cache in the653credentials listing.654655656Value : UseFullRealmList657Type : DWORD (0 or 1)658Default : 0659660If '1', uses the full realms list as determined by parsing the661krb5.ini configuration file in the new credentials dialog box.662If this is '0', only the last recently used list of realms663will be used.6646656663.1.3.1 Per-identity settings667668Registry key 1: 'Software\MIT\NetIDMgr\KCDB\Identity\<principal name>\Krb5Cred'669Registry key 2: 'Software\MIT\NetIDMgr\PluginManager\Plugins\Krb5Cred\Parameters\Realms\<realm>'670Registry key 3: 'Software\MIT\NetIDMgr\PluginManager\Plugins\Krb5Cred\Parameters'671--------------672673These settings are generally maintained per-identity. However, if674a particular setting is not specified for an identity or if the675identity is new, then the values will be looked up in the676per-realm configuration key and in the global parameters key in677turn. Global defaults should be set in the global parameters key678(key 3).679680Value : Addressless681Type : DWORD (boolean)682Default : 1683684Determines if addressless tickets will be obtained for new identities.685686687Value : DefaultLifetime688Type : DWORD689Default : 36000690691Default ticket lifetime, in seconds.692693Value : DefaultRenewLifetime694Type : DWORD695Default : 604800696697Default renewable lifetime, in seconds.698699Value : FileCCList700Type : SZ701Default : <not specified>702703Specifies a comma delimited list of FILE credential caches to monitor704for credentials.705706Value : Forwardable707Type : DWORD (0 or 1)708Default : 0709710Obtain forwardable tickets.711712Value : MaxLifetime713Type : DWORD714Default : 86400715716Maximum lifetime, in seconds. This value is used to set the717range of the user interface controls that allow setting the718lifetime of a ticket.719720Value : MaxRenewLifetime721Type : DWORD722Default : 2592000723724Maximum renewable lifetime, in seconds. The value is used to725set the range of the user interface controls that allow726setting the renewable lifetime of a ticket.727728Value : MinLifetime729Type : DWORD730Default : 60731732Minimum lifetime, in seconds. This value is used to set the733range of the user interface controls that allow setting the734lifetime of a ticket.735736Value : MinRenewLifetime737Type : DWORD738Default : 60739740Minimum renewable lifetime, in seconds. This value is used to741set the range of the user interface controls that allow742setting the renewable lifetime of a ticket.743744Value : Proxiable745Type : DWORD (0 or 1)746Default : 0747748Obtain proxiable tickets.749750Value : Renewable751Type : DWORD (0 or 1)752Default : 1753754Obtain renewable tickets.755756757----------------------------------------------------------------------7587594. Additional Resources760761If you want to add registry keys or files you need to create new762components and features for those.763764Add new features under the 'feaKfwClient' feature and set the765'Level' column for those features to equal the 'Level' for their766parent features for consistency. Note that none of the features767in the "Kerberos for Windows" MSI package are designed to be768installed to run from 'source' or 'advertised'. It is recommended769that you set 'msidbFeatureAttributesFavorLocal' (0),770'msidbFeatureAttributesFollowParent' (2) and771'msidbFeatureAttributesDisallowAdvertise' (8) attributes for new772features.773774If you are creating new components, retain the same component GUID775when creating new transforms against new releases of the Kerberos776MSI package.777778It is beyond the scope of this document to provide a comprehensive779overview of how to add new resources through a transform. Please780refer to the "Windows Installer" documentation for details. The781relevant section is at :782783http://msdn.microsoft.com/library/en-us/msi/setup/using_transforms_to_add_resources.asp784785A sample walkthrough of adding a new configuration file is in786section 2.3.787788----------------------------------------------------------------------7897905. Upgrades791792The MSI package is designed to uninstall previous versions of793"Kerberos for Windows" during installation. Note that it doesn't794directly upgrade an existing installation. This is intentional795and ensures that development releases which do not have strictly796increasing version numbers are properly upgraded.797798Versions of Kerberos that are upgraded by the MSI package are :7998001) "Kerberos for Windows" 32-bit i386 MSI package801802Upgrade code {61211594-AAA1-4A98-A299-757326763CC7}803Up to current release8048052) "Kerberos for Windows" 64-bit amd64 MSI package806807Upgrade code {6DA9CD86-6028-4852-8C94-452CAC229244}808Up to current release8098102) "MIT Project Pismere Kerberos for Windows" MSI package and811"MIT SWRT Kerberos for Windows" MSI812813Upgrade code {83977767-388D-4DF8-BB08-3BF2401635BD}814All versions8158163) "Kerberos for Windows" NSIS package817818All versions819820Note that versions of the "Kerberos for Windows" NSIS package had821a bug where it couldn't be uninstalled properly in unattended822mode. Therefore the MSI package will not try to uninstall an823"Kerberos for Windows" NSIS package if running unattended. This824means that group policy based deployments will fail on machines825that have the "Kerberos for Windows" NSIS package installed.826827If you have used a different MSI package to install Kerberos for828Windows and wish to upgrade it you can author rows into the829'Upgrade' table to have the "Kerberos for Windows" MSI replace these830installations for you.831832----------------------------------------------------------------------8338346. FAQ835836(Q/A's will be added here as needed)837838----------------------------------------------------------------------839$Id$840841842843