Giter VIP home page Giter VIP logo

go-freeipa's Introduction

Unmaintained!!!

This project is unmaintained. This fork is actively maintained.

I no longer work with FreeIPA and can not justify maintaining this project in my free time. Consider using one of the forks, especially ccin2p3/go-freeipa.

go-freeipa

A generated golang client for the FreeIPA API.

See the godoc for usage examples and more info. See developing.md for information on how this library is generated.

go-freeipa's People

Contributors

fbuetler avatar raphink avatar tehwalris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

go-freeipa's Issues

MemberofindirectGroup doesn's support multiple return values

I want to get indirect memberships of particular user via UserShow, e.g. if group ipausers is member in two other groups hiddengroup and secondhiddengroup.

Via CLI it works fine:

$ ipa user-show testuser
  User login: testuser
  First name: test
  Last name: test
  Home directory: /home/testuser
  Login shell: /bin/sh
  Principal name: [email protected]
  Principal alias: [email protected]
  Email address: [email protected]
  UID: 1377000025
  GID: 1377000025
  Account disabled: False
  Password: False
  Member of groups: ipausers
  Indirect Member of group: secondhiddengroup, hiddengroup     <---- two results
  Kerberos keys available: False

Via freeipa.UserShow I get an error from UserShow:

unexpected value for field MemberofindirectGroup: [secondhiddengroup hiddengroup]; expected at most one element 
$ ipa --version
VERSION: 4.6.8, API_VERSION: 2.237
$ rpm -qa | grep ipa
ipa-common-4.6.8-5.el7.centos.4.noarch
python2-ipaserver-4.6.8-5.el7.centos.4.noarch
python-ipaddress-1.0.16-2.el7.noarch
python-iniparse-0.4-9.el7.noarch
ipa-client-common-4.6.8-5.el7.centos.4.noarch
libipa_hbac-1.16.5-10.el7_9.7.x86_64
python-libipa_hbac-1.16.5-10.el7_9.7.x86_64
python2-ipaclient-4.6.8-5.el7.centos.4.noarch
ipa-client-4.6.8-5.el7.centos.4.x86_64
ipa-server-dns-4.6.8-5.el7.centos.4.noarch
sssd-ipa-1.16.5-10.el7_9.7.x86_64
ipa-server-common-4.6.8-5.el7.centos.4.noarch
python2-ipalib-4.6.8-5.el7.centos.4.noarch
ipa-server-4.6.8-5.el7.centos.4.x86_64

Correctly decode certificates

FreeIPA sends certificates in a special way. In the schema they are either string or Certificate. In the response they are sent as {"__base64__": "thecertinbase64"}. The current implementation either crashes or returns an interface{}. It should not crash and should return string or byte[].

Yes, there is a reason. Certificates are actually modeled as maps with a `__base64__` subfield, so casting them as strings failed.

Originally posted by @raphink in #7

SudoRuleFind - unexpected value for field Ipaenabledflag: [TRUE] ([]interface {})

The Sudorule struct is expecting Ipaenabledflag to be a bool, while FreeIPA returns a string of TRUE, causing this function to error.

package main import ( "crypto/tls" "fmt" "net/http" "github.com/tehwalris/go-freeipa/freeipa" ) func main() { tspt := &http.Transport{} client, err := freeipa.Connect("<host>", tspt, "<user>", "<pass>") if err != nil { panic(err) } resa, erra := client.SudoruleFind("", &freeipa.SudoruleFindArgs{}, &freeipa.SudoruleFindOptionalArgs{}) if erra != nil { fmt.Printf("Issue: %s\n", erra) return } }

Returns:
Issue: unexpected value for field Ipaenabledflag: [TRUE] ([]interface {})

Error parsing Services

freeipa 4.6.6

when ServiceFind() or ServiceShow

unexpected value for field Subject: <nil> (<nil>)

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.