Coder Social home page Coder Social logo

Comments (5)

isaacabraham avatar isaacabraham commented on August 17, 2024

Hey @gursharan001 . Sorry for the slow response. Yes, I would definitely support adding this functionality. Happy to help in terms of API design etc.. I'm sure @ninjarobot would be happy as well to lend some advice.

from farmer.

gursharan001 avatar gursharan001 commented on August 17, 2024

Thanks @isaacabraham @ninjarobot

I thought API could be something like below

type ActiveDirectoryPrincipalType = User | Group

type ActiveDirectoryAdminSettings =
    {
         /// Active Directory name of user or group
         Login: string
         /// Active Directory object id of user or group
         Sid: string
         PrincipalType: ActiveDirectoryPrincipalType
         AdOnlyAuth: bool
    }

and then Farmers.Builders.SqlAzure.SqlAzureConfig updated as

type SqlAzureConfig =
    {
        Name: SqlAccountName
        AdministratorCredentials: {| UserName: string
                                     Password: SecureParameter |}
        /// new setting
        ActiveDirectoryAdmin: ActiveDirectoryAdminSettings option

        MinTlsVersion: TlsVersion option
        FirewallRules: {| Name: ResourceName
                          Start: IPAddress
                          End: IPAddress |} list
        ElasticPoolSettings: {| Name: ResourceName option
                                Sku: PoolSku
                                PerDbLimits: {| Min: int<DTU>; Max: int<DTU> |} option
                                Capacity: int<Mb> option |}
        Databases: SqlAzureDbConfig list
        GeoReplicaServer: GeoReplicationSettings option
        Tags: Map<string, string>
    }

for scenario when AdOnlyAuth is true, Farmers.Builders.SqlAzure.SqlServerBuilder.Run might raise an error or silently ignore the password if provided. I prefer raising an error.

What are your thoughts?

from farmer.

ninjarobot avatar ninjarobot commented on August 17, 2024

@gursharan001 thanks for the proposal. The config structure looks good - do you know if both the SID and the login name are required or can either work?

As far as the password, it's a SecureParameter and Farmer can control whether to emit a parameter for it, so I suggest that when AdOnlyAuth is set to true, just don't emit one.

from farmer.

gursharan001 avatar gursharan001 commented on August 17, 2024

@ninjarobot yes both SID and login are required. I will submit a PR soon. Thanks!

from farmer.

gursharan001 avatar gursharan001 commented on August 17, 2024

@isaacabraham / @ninjarobot , please review the PR when you get a chance

from farmer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.