tehwalris / go-freeipa Goto Github PK
View Code? Open in Web Editor NEWA generated golang client for the FreeIPA API.
License: MIT License
A generated golang client for the FreeIPA API.
License: MIT License
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 {})
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
hi, any plans to add kerberos support?
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.
freeipa 4.6.6
when ServiceFind()
or ServiceShow
unexpected value for field Subject: <nil> (<nil>)
Hi, any plans to support service discovery via DNS?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.