<p>Encouraged by SO, I'm trying to write an ASP.NET site that uses OpenID for user authentication.  It's a regular WinForms site (not MVC.NET), using the <a href="http://code.google.com/p/dotnetopenid/" rel="nofollow noreferrer">DotNetOpenId</a> library for authentication.</p>

<p>Is it safe for me to permit/deny administrative functions on the site by simply comparing the current session's "ClaimedID" (as returned in the OpenIdLogin_LoggedIn event, as member DotNetOpenId.RelyingParty,OpenIdEventArgs.Response.ClaimedIdentifier) to a known administrator's OpenID (i.e. mine)?</p>

<p>If so, is it safe for this ID to be visible (e.g. in open source code), or should it be "hidden" in a configuration file or a database row?  (I know it's better design to make it configurable, my question is just about safety.)</p>

My solution is to follow the same idea of the Roles table. After you've authenticated the user, look up that user's roles. If the user has role "Administrator" in the UserRoles table, then they can do whatever the Administrator can do.
I don't broadcast open ID's in my app. They're stored in the table. On every action result, I'm hitting the Users table, since I have also modified mine to store various user state information. With the exception of the home page, there is going to be some user information that I need from that table. I'm using LINQ, so I include the .LoadWith() to load the User with his list of roles when it serializes.