summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/service.py
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2012-03-26 14:23:42 +0300
committerMartin Kosek <mkosek@redhat.com>2012-06-07 09:39:10 +0200
commitcbb1d626b913a7ce802150aa15bda761c9768695 (patch)
tree2a4f05111ec95abce4e7a613749028eec9eae4dc /ipalib/plugins/service.py
parent27517c2008d040f340fa2b9ace51fba4baea3eef (diff)
downloadfreeipa-cbb1d626b913a7ce802150aa15bda761c9768695.tar.gz
freeipa-cbb1d626b913a7ce802150aa15bda761c9768695.tar.xz
freeipa-cbb1d626b913a7ce802150aa15bda761c9768695.zip
Perform case-insensitive searches for principals on TGS requests
We want to always resolve TGS requests even if the user mistakenly sends a request for a service ticket where the fqdn part contain upper case letters. The actual implementation follows hints set by KDC. When AP_REQ is done, KDC sets KRB5_FLAG_ALIAS_OK and we obey it when looking for principals on TGS requests. https://fedorahosted.org/freeipa/ticket/1577
Diffstat (limited to 'ipalib/plugins/service.py')
-rw-r--r--ipalib/plugins/service.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py
index 24a0a0f87..60035bf6d 100644
--- a/ipalib/plugins/service.py
+++ b/ipalib/plugins/service.py
@@ -221,7 +221,7 @@ class service(LDAPObject):
object_name_plural = _('services')
object_class = [
'krbprincipal', 'krbprincipalaux', 'krbticketpolicyaux', 'ipaobject',
- 'ipaservice', 'pkiuser'
+ 'ipaservice', 'pkiuser', 'ipakrbprincipal'
]
search_attributes = ['krbprincipalname', 'managedby']
default_attributes = ['krbprincipalname', 'usercertificate', 'managedby']
@@ -293,6 +293,11 @@ class service_add(LDAPCreate):
if not 'managedby' in entry_attrs:
entry_attrs['managedby'] = hostresult['dn']
+ # Enforce ipaKrbPrincipalAlias to aid case-insensitive searches
+ # as krbPrincipalName/krbCanonicalName are case-sensitive in Kerberos
+ # schema
+ entry_attrs['ipakrbprincipalalias'] = keys[-1]
+
return dn
api.register(service_add)
='n239' href='#n239'>239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,