KeepassRPC forget the authorized clients when restarting keepass


#1

Hey, I’m currently facing a problem with the keepassRPC plugin (1.8.0).
The problem is that everytime I close Keepass and then reload it, my authorized clients disapear and Kee ask for the authorization.

I’m currently using an enforced config file when I’m facing this problem and when I remove it, keepass remember the authorization.

I’ve also noticed that in both case a Keepass.config file is created within the AppData\Roaming\KeePass\ folder and that it cointains the config for KeePassRPC with the same “UniqueID” as in the “Authorised clients” section in the KeePassRPC options. Another thing I’ve noticed is that KeePassRPC always end up with the same Unique ID as before he losed it.

here is my enforced config file
thanks for the answer, I hope I have made this sufficiently clear.

Summary
<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Meta>
        <PreferUserConfiguration>true</PreferUserConfiguration>
    </Meta>
    <Application>
        <TemplateGroupId>00000000-0000-0000-0000-000000000000</TemplateGroupId>
        <HelpUseLocal>false</HelpUseLocal>
        <LastUsedFile>
            <CredProtMode>Obf</CredProtMode>
            <CredSaveMode>NoSave</CredSaveMode>
        </LastUsedFile>
        <MostRecentlyUsed>
            <MaxItemCount>12</MaxItemCount>
            <Items />
        </MostRecentlyUsed>
	<LanguageFile>French.lngx</LanguageFile>
        <Start>
            <OpenLastFile>true</OpenLastFile>
            <CheckForUpdate>false</CheckForUpdate>
            <MinimizedAndLocked>false</MinimizedAndLocked>
            <PluginCacheDeleteOld>false</PluginCacheDeleteOld>
            <PluginCacheClearOnce>false</PluginCacheClearOnce>
        </Start>
        <FileOpening>
            <ShowExpiredEntries>false</ShowExpiredEntries>
            <ShowSoonToExpireEntries>false</ShowSoonToExpireEntries>
        </FileOpening>
        <VerifyWrittenFileAfterSaving>true</VerifyWrittenFileAfterSaving>
        <UseTransactedFileWrites>true</UseTransactedFileWrites>
        <FileClosing>
            <AutoSave>true</AutoSave>
        </FileClosing>
        <TriggerSystem>
            <Enabled>false</Enabled>  *Leave both lines if disabling the trigger system
            <Triggers />             *Remove this line if you wan to allow users to set their own triggers
        </TriggerSystem>
        <PluginCachePath />
    </Application>
    <Logging>
        <Enabled>false</Enabled>
    </Logging>
    <MainWindow>
        <X>353</X>
        <Y>264</Y>
        <Width>1120</Width>
        <Height>583</Height>
        <Maximized>false</Maximized>
        <SplitterHorizontalFrac>0.8319149</SplitterHorizontalFrac>
        <SplitterVerticalFrac>0.25</SplitterVerticalFrac>
        <Layout>Default</Layout>
        <AlwaysOnTop>false</AlwaysOnTop>
        <CloseButtonMinimizesWindow>false</CloseButtonMinimizesWindow>
        <MinimizeToTray>false</MinimizeToTray>
        <ShowFullPathInTitle>false</ShowFullPathInTitle>
        <DropToBackAfterClipboardCopy>false</DropToBackAfterClipboardCopy>
        <MinimizeAfterClipboardCopy>false</MinimizeAfterClipboardCopy>
        <MinimizeAfterLocking>false</MinimizeAfterLocking>
        <MinimizeAfterOpeningDatabase>false</MinimizeAfterOpeningDatabase>
        <QuickFindSearchInPasswords>false</QuickFindSearchInPasswords>
        <QuickFindExcludeExpired>false</QuickFindExcludeExpired>
        <FocusResultsAfterQuickFind>false</FocusResultsAfterQuickFind>
        <FocusQuickFindOnUntray>false</FocusQuickFindOnUntray>
        <CopyUrlsInsteadOfOpening>false</CopyUrlsInsteadOfOpening>
        <DisableSaveIfNotModified>true</DisableSaveIfNotModified>
        <ToolBar>
            <Show>true</Show>
        </ToolBar>
        <EntryView>
            <Show>true</Show>
            <HideProtectedCustomStrings>true</HideProtectedCustomStrings>
        </EntryView>
        <TanView>
            <UseSimpleView>true</UseSimpleView>
            <ShowIndices>true</ShowIndices>
        </TanView>
        <EntryListColumnCollection>
            <Column>
                <Type>Title</Type>
                <CustomName />
                <Width>195</Width>
                <HideWithAsterisks>false</HideWithAsterisks>
            </Column>
            <Column>
                <Type>UserName</Type>
                <CustomName />
                <Width>90</Width>
                <HideWithAsterisks>false</HideWithAsterisks>
            </Column>
            <Column>
                <Type>Password</Type>
                <CustomName />
                <Width>113</Width>
                <HideWithAsterisks>true</HideWithAsterisks>
            </Column>
            <Column>
                <Type>Url</Type>
                <CustomName />
                <Width>90</Width>
                <HideWithAsterisks>false</HideWithAsterisks>
            </Column>
            <Column>
                <Type>Notes</Type>
                <CustomName />
                <Width>90</Width>
                <HideWithAsterisks>false</HideWithAsterisks>
            </Column>
        </EntryListColumnCollection>
        <EntryListColumnDisplayOrder>0 1 2 3 4</EntryListColumnDisplayOrder>
        <EntryListAutoResizeColumns>false</EntryListAutoResizeColumns>
        <EntryListAlternatingBgColors>true</EntryListAlternatingBgColors>
        <ListSorting>
            <Column>-1</Column>
            <Order>Ascending</Order>
            <CompareNaturally>true</CompareNaturally>
            <CompareTimes>false</CompareTimes>
        </ListSorting>
        <ShowEntriesOfSubGroups>false</ShowEntriesOfSubGroups>
    </MainWindow>
    <UI>
        <TrayIcon>
            <ShowOnlyIfTrayed>false</ShowOnlyIfTrayed>
            <SingleClickDefault>false</SingleClickDefault>
        </TrayIcon>
        <ShowDbMntncResultsDialog>false</ShowDbMntncResultsDialog>
		<ShowEmSheetDialog>false</ShowEmSheetDialog>
        <Hiding>
            <SeparateHidingSettings>false</SeparateHidingSettings>
            <HideInEntryWindow>true</HideInEntryWindow>
            <UnhideButtonAlsoUnhidesSource>false</UnhideButtonAlsoUnhidesSource>
        </Hiding>
        <StandardFont>
            <Family>Microsoft Sans Serif</Family>
            <Size>8.25</Size>
            <GraphicsUnit>Point</GraphicsUnit>
            <Style>Regular</Style>
            <OverrideUIDefault>false</OverrideUIDefault>
        </StandardFont>
        <PasswordFont>
            <Family>Courier New</Family>
            <Size>8.25</Size>
            <GraphicsUnit>Point</GraphicsUnit>
            <Style>Regular</Style>
            <OverrideUIDefault>false</OverrideUIDefault>
        </PasswordFont>
        <ForceSystemFontUnix>true</ForceSystemFontUnix>
        <BannerStyle>WinVistaBlack</BannerStyle>
        <ShowImportStatusDialog>true</ShowImportStatusDialog>
        <UseCustomToolStripRenderer>true</UseCustomToolStripRenderer>
        <OptimizeForScreenReader>false</OptimizeForScreenReader>
        <DataEditorWidth>-16381</DataEditorWidth>
        <DataEditorHeight>-16381</DataEditorHeight>
        <DataEditorFont>
            <Family>Microsoft Sans Serif</Family>
            <Size>8.25</Size>
            <GraphicsUnit>Point</GraphicsUnit>
            <Style>Regular</Style>
            <OverrideUIDefault>false</OverrideUIDefault>
        </DataEditorFont>
        <DataEditorWordWrap>true</DataEditorWordWrap>
        <CharPickerRect />
        <KeyCreationFlags>0</KeyCreationFlags>
        <KeyPromptFlags>0</KeyPromptFlags>
    </UI>
    <Security>
        <WorkspaceLocking>
            <LockOnWindowMinimize>false</LockOnWindowMinimize>
            <LockOnSessionSwitch>true</LockOnSessionSwitch>
            <LockOnSuspend>true</LockOnSuspend>
            <LockOnRemoteControlChange>true</LockOnRemoteControlChange>
            <LockAfterTime>300</LockAfterTime>
            <LockAfterGlobalTime>240</LockAfterGlobalTime>
            <ExitInsteadOfLockingAfterTime>false</ExitInsteadOfLockingAfterTime>
        </WorkspaceLocking>
        <Policy>
            <Plugins>true</Plugins>
            <Export>false</Export>
            <ExportNoKey>false</ExportNoKey>
            <Import>false</Import>
            <Print>false</Print>
            <PrintNoKey>false</PrintNoKey>
            <NewFile>true</NewFile>
            <SaveFile>true</SaveFile>
            <AutoType>true</AutoType>
            <AutoTypeWithoutContext>true</AutoTypeWithoutContext>
            <CopyToClipboard>true</CopyToClipboard>
            <CopyWholeEntries>true</CopyWholeEntries>
            <DragDrop>true</DragDrop>
            <UnhidePasswords>false</UnhidePasswords>
            <ChangeMasterKey>false</ChangeMasterKey>
            <ChangeMasterKeyNoKey>false</ChangeMasterKeyNoKey>
            <EditTriggers>false</EditTriggers>
        </Policy>
        <MasterPassword>
            <MinimumLength>0</MinimumLength>
            <MinimumQuality>0</MinimumQuality>
        </MasterPassword>
        <MasterKeyOnSecureDesktop>false</MasterKeyOnSecureDesktop>
        <ClipboardClearOnExit>true</ClipboardClearOnExit>
        <ClipboardClearAfterSeconds>12</ClipboardClearAfterSeconds>
        <UseClipboardViewerIgnoreFormat>false</UseClipboardViewerIgnoreFormat>
        <ClearKeyCommandLineParams>true</ClearKeyCommandLineParams>
    </Security>
    <Native>
        <NativeKeyTransformations>true</NativeKeyTransformations>
    </Native>
    <PasswordGenerator>
        <AutoGeneratedPasswordsProfile>
            <Name />
            <GeneratorType>CharSet</GeneratorType>
            <CollectUserEntropy>false</CollectUserEntropy>
            <Length>20</Length>
            <CharSetRanges>ULD_______</CharSetRanges>
            <CharSetAdditional />
            <Pattern />
            <PatternPermutePassword>false</PatternPermutePassword>
            <ExcludeLookAlike>false</ExcludeLookAlike>
            <NoRepeatingCharacters>false</NoRepeatingCharacters>
            <ExcludeCharacters />
            <CustomAlgorithmUuid />
            <CustomAlgorithmOptions />
        </AutoGeneratedPasswordsProfile>
        <LastUsedProfile>
            <Name>(Custom)</Name>
            <GeneratorType>CharSet</GeneratorType>
            <CollectUserEntropy>false</CollectUserEntropy>
            <Length>20</Length>
            <CharSetRanges>ULD_______</CharSetRanges>
            <CharSetAdditional />
            <Pattern />
            <PatternPermutePassword>false</PatternPermutePassword>
            <ExcludeLookAlike>false</ExcludeLookAlike>
            <NoRepeatingCharacters>false</NoRepeatingCharacters>
            <ExcludeCharacters />
            <CustomAlgorithmUuid />
            <CustomAlgorithmOptions />
        </LastUsedProfile>
        <UserProfiles />
    </PasswordGenerator>
    <Defaults>
        <NewEntryExpiresInDays>-1</NewEntryExpiresInDays>
        <OptionsTabIndex>0</OptionsTabIndex>
        <TanCharacters>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-</TanCharacters>
        <TanExpiresOnUse>true</TanExpiresOnUse>
        <SearchParameters>
            <SearchString />
            <RegularExpression>false</RegularExpression>
            <SearchInTitles>true</SearchInTitles>
            <SearchInUserNames>true</SearchInUserNames>
            <SearchInPasswords>false</SearchInPasswords>
            <SearchInUrls>true</SearchInUrls>
            <SearchInNotes>true</SearchInNotes>
            <SearchInOther>true</SearchInOther>
            <SearchInUuids>false</SearchInUuids>
            <SearchInGroupNames>false</SearchInGroupNames>
            <SearchInTags>true</SearchInTags>
            <ComparisonMode>InvariantCultureIgnoreCase</ComparisonMode>
            <ExcludeExpired>false</ExcludeExpired>
        </SearchParameters>
        <FileSaveAsDirectory />
        <RememberKeySources>true</RememberKeySources>
        <KeySources />
        <CustomColors />
        <WinFavsBaseFolderName />
        <RecycleBinCollapse>false</RecycleBinCollapse>
    </Defaults>
    <Integration>
        <HotKeyGlobalAutoType>393281</HotKeyGlobalAutoType>
        <HotKeySelectedAutoType>0</HotKeySelectedAutoType>
        <HotKeyShowWindow>393291</HotKeyShowWindow>
        <HotKeyEntryMenu>0</HotKeyEntryMenu>
        <UrlOverride />
        <UrlSchemeOverrides>
            <SetToDefaults>false</SetToDefaults>
            <Overrides>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>ssh</Scheme>
                    <UrlOverride>cmd://PuTTY.exe -ssh {USERNAME}@{URL:RMVSCM}</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>http</Scheme>
                    <UrlOverride>cmd://{INTERNETEXPLORER} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>https</Scheme>
                    <UrlOverride>cmd://{INTERNETEXPLORER} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>http</Scheme>
                    <UrlOverride>cmd://{FIREFOX} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>https</Scheme>
                    <UrlOverride>cmd://{FIREFOX} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>chrome</Scheme>
                    <UrlOverride>cmd://{FIREFOX} -chrome "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>http</Scheme>
                    <UrlOverride>cmd://{OPERA} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>https</Scheme>
                    <UrlOverride>cmd://{OPERA} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>http</Scheme>
                    <UrlOverride>cmd://{GOOGLECHROME} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>https</Scheme>
                    <UrlOverride>cmd://{GOOGLECHROME} "{URL}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>kdbx</Scheme>
                    <UrlOverride>cmd://"{APPDIR}\KeePass.exe" "{URL:RMVSCM}" -pw-enc:"{PASSWORD_ENC}"</UrlOverride>
                </Override>
                <Override>
                    <Enabled>false</Enabled>
                    <Scheme>kdbx</Scheme>
                    <UrlOverride>cmd://mono "{APPDIR}/KeePass.exe" "{URL:RMVSCM}" -pw-enc:"{PASSWORD_ENC}"</UrlOverride>
                </Override>
            </Overrides>
        </UrlSchemeOverrides>
        <SearchKeyFiles>false</SearchKeyFiles>
        <SearchKeyFilesOnRemovableMedia>false</SearchKeyFilesOnRemovableMedia>
        <LimitToSingleInstance>false</LimitToSingleInstance>
        <AutoTypeMatchByTitle>true</AutoTypeMatchByTitle>
        <AutoTypePrependInitSequenceForIE>true</AutoTypePrependInitSequenceForIE>
        <AutoTypeReleaseAltWithKeyPress>true</AutoTypeReleaseAltWithKeyPress>
        <AutoTypeCancelOnWindowChange>false</AutoTypeCancelOnWindowChange>
    </Integration>
    <Custom />
</Configuration>

#2

I’ve not got any experience with enforced config files so you might find better help on the KeePass forum but I can confirm that KeePassRPC needs to be able to read and save its configuration into a config file that is persisted when KeePass is restarted, otherwise you will see this behaviour.

The UniqueID is supplied by the client that connects to KeePassRPC (most likely the Kee browser addon) so it is expected that this will be the same each time the client is reconnected.


#3

I’m also having this problem. In my case it happens because I am using a sandbox, which fails to find the configuration file next time the sandbox is opened. But how can I tell KeePass RPC where to put the configuration file?


#4

KeePassRPC has no control over its configuration file. It just asks KeePass to deal with configuration so I suggest checking the KeePass docs about configuration and then the KeePass forum - I’m sure other people have tried sandboxing KeePass before so there should be some existing knowledge there about how to manage configuration files, although this is perhaps specific to your sandboxing software so you may need to refer to the manual for that as well.

Note that if your sandbox isolates KeePass from the localhost network on your computer, Kee will be unable to connect to it.