# Prevent or stop credential cache in openHistorian 2.6.x

**URL:** <http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893>\
**Category:** openHistorian\
**Created:** [May 21, 2021, 4:26am UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893 "2021-05-21T04:26:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![logesaustralia](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/logesaustralia/32/514_2.png) [@logesaustralia](http://discussions.gridprotectionalliance.org/u/logesaustralia)\
**Post date:** [May 21, 2021, 4:26am UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/1 "2021-05-21T04:26:12Z")

</div>

Hi Ritchie,

Currently, I’m using openHistorian 2.6.30.x.  
Is there any option to stop or prevent credential cache?

Thanks & Regards  
Logu

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [May 21, 2021, 7:57pm UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/2 "2021-05-21T19:57:08Z")

</div>

Might be as simple as commenting out a line of code or two - but I don’t think there’s an option to disable this feature.

Thanks,  
Ritchie

---

<div class="post-metadata">

**Author:** ![logesaustralia](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/logesaustralia/32/514_2.png) [@logesaustralia](http://discussions.gridprotectionalliance.org/u/logesaustralia)\
**Post date:** [May 24, 2021, 12:23am UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/3 "2021-05-24T00:23:06Z")

</div>

Hi Ritchie,

Good Morning.

Could you please locate the code, where we need to comment? So that I will try.  
Also in 2.8, do we have any switch/option to handle this.  
Reason is whenever credential cache file is reaching size “7 KB”, not allowing to login and saying like “Attempting authentication”.

Regards  
Logu

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [May 24, 2021, 2:52pm UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/4 "2021-05-24T14:52:04Z")

</div>

After a code review, it could be that the system is trying to compact the file and causing some delays.

Are you using most database or Active Directory / local machine based authentications?

Thanks,  
Ritchie

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [May 24, 2021, 6:23pm UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/5 "2021-05-24T18:23:38Z")

</div>

FYI - updated 2.8 code base to include option to disable:

> <https://github.com/GridProtectionAlliance/gsf/commit/9220975b4f6c4bf700cc61a3fed8ae5ed8f28bbb>

---

<div class="post-metadata">

**Author:** ![logesaustralia](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/logesaustralia/32/514_2.png) [@logesaustralia](http://discussions.gridprotectionalliance.org/u/logesaustralia)\
**Post date:** [May 25, 2021, 12:50am UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/6 "2021-05-25T00:50:25Z")

</div>

Hi Ritchie,

From my analysis, actual cause:

When using both database user as well as Active Directory users.

For internal users, we have provided active Directory users and external users, we provided database user. When login to openHistorian 2.6 portal using both users at the time, we are getting this error.

Also, I found one more scenario.

1. We have below type of usernames  
a. Local database username: logu  
b. Active Directory username: domain\logu

2. When login using database username “logu”, its always giving **401 error**.

Thanks & Regards  
Logu

---

<div class="post-metadata">

**Author:** ![logesaustralia](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/logesaustralia/32/514_2.png) [@logesaustralia](http://discussions.gridprotectionalliance.org/u/logesaustralia)\
**Post date:** [May 26, 2021, 12:46am UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/7 "2021-05-26T00:46:06Z")

</div>

Hi Ritchie,  
If I incorporate this code alone, will it solve problem or do we need to add or check other modules as well?

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [May 30, 2021, 1:54pm UTC](http://discussions.gridprotectionalliance.org/t/prevent-or-stop-credential-cache-in-openhistorian-2-6-x/893/8 "2021-05-30T13:54:23Z")

</div>

This code update will allow disabling of the credential cache, which you had identified as the problem spot.

I do not believe this will help with the case where you have both a database user and a domain user with the same name, at this point, this will likely default to AD user and/or have unexpected results.

Thanks,  
Ritchie
