Function of Login Created from Asymmetric Key in External Access Assemblies?

  • One of the ways of creating an EXTERNAL_ACCESS assembly is to:

    (1) CREATE ASYMMETRIC KEY from the assembly dll;

    (2) CREATE LOGIN FROM the ASYMMETRIC KEY;

    (3) Grant EXTERNAL ACCESS ASSEMBLY permission to the LOGIN created in previous step;

    (4) CREATE ASSEMBLY ... WITH permission_set = EXTERNAL_ACCESS;

    I understand that an increased level of trust is required when external resources are accessed, hence the asymmetric key.

    However, I don't see what the purpose of the LOGIN is.

    In BOL (http://msdn.microsoft.com/en-us/library/ms189751.aspx) I read:

    Logins created from certificates or asymmetric keys are used only for code signing. They cannot be used to connect to SQL Server.

    Can someone please explain what that means?

    What does this LOGIN actually do?!

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • I believe that you have to make the login the Owner (or executor?) of the Assembly

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • rbarryyoung (5/21/2008)


    I believe that you have to make the login the Owner (or executor?) of the Assembly

    I did not have to make it owner of the assembly. But perhaps, as you say, it is the executor...

    I just don't understand the BOL speak (see opening post).

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • I agree, it's confusing. I am not sure what the answer is either.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • rbarryyoung (5/22/2008)


    I agree, it's confusing. I am not sure what the answer is either.

    No problem, thank you for responding.

    I will be making the case for SQLCLR in an upcoming meeting, and I'm trying to fill up holes in my understanding (of which there are many! :w00t: )

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • As it happens, I was just working with a customer today on CLR assemblies, and it seems that the key/login is supposed to be used to "Sign" the assembly when it is built. The list that you have looks like it combines two different things: 1) creating an assembly that has been singed with a certificate or strong name(assymetric key), whose corresponding login has the EXTERNAL_ACCESS permission, as opposed to 2) Giving TRUSTWORTHY to the database and EXTERNAL_ACCESS permission to the database owner.

    here is a microsoft link that explains: http://msdn.microsoft.com/en-us/library/ms345106.aspx

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply