1 /* $Id$ 2 * 3 * Lasso - A free implementation of the Liberty Alliance specifications. 4 * 5 * Copyright (C) 2004-2007 Entr'ouvert 6 * http://lasso.entrouvert.org 7 * 8 * Authors: See AUTHORS file in top-level directory. 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, see <http://www.gnu.org/licenses/>. 22 */ 23 24 /** 25 * SECTION:errors 26 * @short_description: Error codes returned by lasso functions 27 * @include: lasso/errors.h 28 * 29 * Most functions in lasso return signed integer error codes. The convention is to give: 30 * <itemizedlist> 31 * <listitem><para>a negative error code for programming or runtime recoverable errors,</para></listitem> 32 * <listitem><para>a positive error code for Liberty Alliance recoverable errors.</para></listitem> 33 * </itemizedlist> 34 * 35 * <para><emphasis>Beware that this convention is not always well followed.</emphasis></para> 36 */ 37 38 #include "export.h" 39 40 LASSO_EXPORT const char* lasso_strerror(int error_code); 41 42 /** 43 * LASSO_ERROR_UNDEFINED: 44 * 45 * Undefined error. 46 */ 47 #define LASSO_ERROR_UNDEFINED -1 48 /** 49 * LASSO_ERROR_UNIMPLEMENTED: 50 * 51 * Unimplemented part of Lasso. 52 */ 53 #define LASSO_ERROR_UNIMPLEMENTED -2 54 /** 55 * LASSO_ERROR_OUT_OF_MEMORY: 56 * 57 * Out of memory 58 */ 59 #define LASSO_ERROR_OUT_OF_MEMORY -3 60 /** 61 * LASSO_ERROR_CAST_FAILED: 62 * 63 * Expected GObject class was not found, cast failed 64 */ 65 #define LASSO_ERROR_CAST_FAILED -4 66 67 /* generic XML */ 68 /** 69 * LASSO_XML_ERROR_NODE_NOT_FOUND: 70 * 71 * Unable to get child of element. 72 */ 73 #define LASSO_XML_ERROR_NODE_NOT_FOUND -10 74 /** 75 * LASSO_XML_ERROR_NODE_CONTENT_NOT_FOUND: 76 * 77 * Unable to get content of element. 78 */ 79 #define LASSO_XML_ERROR_NODE_CONTENT_NOT_FOUND -11 80 /** 81 * LASSO_XML_ERROR_ATTR_NOT_FOUND: 82 * 83 * Unable to get attribute of element. 84 */ 85 #define LASSO_XML_ERROR_ATTR_NOT_FOUND -12 86 /** 87 * LASSO_XML_ERROR_ATTR_VALUE_NOT_FOUND: 88 * 89 * Unable to get attribute value of element. 90 */ 91 #define LASSO_XML_ERROR_ATTR_VALUE_NOT_FOUND -13 92 /** 93 * LASSO_XML_ERROR_INVALID_FILE: 94 * 95 * Invalid XML file 96 */ 97 #define LASSO_XML_ERROR_INVALID_FILE -14 98 /** 99 * LASSO_XML_ERROR_OBJECT_CONSTRUCTION_FAILED: 100 * 101 * Construction of an object from an XML document failed. 102 */ 103 #define LASSO_XML_ERROR_OBJECT_CONSTRUCTION_FAILED -15 104 /** 105 * LASSO_XML_ERROR_MISSING_NAMESPACE: 106 * 107 * A namespace is missing. 108 */ 109 #define LASSO_XML_ERROR_MISSING_NAMESPACE -16 110 /** 111 * LASSO_XML_ERROR_SCHEMA_INVALID_FRAGMENT: 112 * 113 * An XML tree does not respect at least an XML schema of its namespaces. 114 */ 115 #define LASSO_XML_ERROR_SCHEMA_INVALID_FRAGMENT 17 116 /** 117 * LASSO_XML_ERROR_ATTR_VALUE_INVALID: 118 * 119 * Attribute value is invalid. 120 */ 121 #define LASSO_XML_ERROR_ATTR_VALUE_INVALID -18 122 123 /* XMLDSig */ 124 /** 125 * LASSO_DS_ERROR_SIGNATURE_NOT_FOUND: 126 * 127 * Signature element not found. 128 */ 129 #define LASSO_DS_ERROR_SIGNATURE_NOT_FOUND 101 130 /** 131 * LASSO_DS_ERROR_INVALID_SIGNATURE: 132 * 133 * Invalid signature. 134 */ 135 #define LASSO_DS_ERROR_INVALID_SIGNATURE 102 136 #define LASSO_DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED -103 137 /** 138 * LASSO_DS_ERROR_CONTEXT_CREATION_FAILED: 139 * 140 * Failed to create signature context. 141 */ 142 #define LASSO_DS_ERROR_CONTEXT_CREATION_FAILED -104 143 /** 144 * LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED: 145 * 146 * Failed to load public key. 147 */ 148 #define LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED -105 149 /** 150 * LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED: 151 * 152 * Failed to load private key. 153 */ 154 #define LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED -106 155 /** 156 * LASSO_DS_ERROR_CERTIFICATE_LOAD_FAILED: 157 * 158 * Failed to load certificate. 159 */ 160 #define LASSO_DS_ERROR_CERTIFICATE_LOAD_FAILED -107 161 /** 162 * LASSO_DS_ERROR_SIGNATURE_FAILED: 163 * 164 * Failed to sign the node. 165 */ 166 #define LASSO_DS_ERROR_SIGNATURE_FAILED -108 167 /** 168 * LASSO_DS_ERROR_KEYS_MNGR_CREATION_FAILED: 169 * 170 * Failed to create keys manager. 171 */ 172 #define LASSO_DS_ERROR_KEYS_MNGR_CREATION_FAILED -109 173 /** 174 * LASSO_DS_ERROR_KEYS_MNGR_INIT_FAILED: 175 * 176 * Failed to initialize keys manager. 177 */ 178 #define LASSO_DS_ERROR_KEYS_MNGR_INIT_FAILED -110 179 /** 180 * LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED: 181 * 182 * Failed to verify signature. 183 */ 184 #define LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED -111 185 #define LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED -112 186 /** 187 * LASSO_DS_ERROR_INVALID_SIGALG: 188 * 189 * Invalid signature algorithm. 190 */ 191 #define LASSO_DS_ERROR_INVALID_SIGALG -113 192 /** 193 * LASSO_DS_ERROR_DIGEST_COMPUTE_FAILED: 194 * 195 * Computation of an SHA1 digest failed. 196 */ 197 #define LASSO_DS_ERROR_DIGEST_COMPUTE_FAILED -114 198 /** 199 * LASSO_DS_ERROR_SIGNATURE_TEMPLATE_NOT_FOUND: 200 * 201 * Signature template has not been found. 202 */ 203 #define LASSO_DS_ERROR_SIGNATURE_TEMPLATE_NOT_FOUND -115 204 /** 205 * LASSO_DS_ERROR_TOO_MUCH_REFERENCES: 206 * 207 * SAML signature must contain only one reference 208 */ 209 #define LASSO_DS_ERROR_TOO_MUCH_REFERENCES -116 210 /** 211 * LASSO_DS_ERROR_INVALID_REFERENCE_FOR_SAML: 212 * 213 * SAML signature reference must be to a Request, a Reponse or an Assertion ID attribute 214 */ 215 #define LASSO_DS_ERROR_INVALID_REFERENCE_FOR_SAML -117 216 /** 217 * LASSO_DS_ERROR_DECRYPTION_FAILED: 218 * 219 * Decryption of an encrypted node failed 220 */ 221 #define LASSO_DS_ERROR_DECRYPTION_FAILED 118 222 /** 223 * LASSO_DS_ERROR_ENCRYPTION_FAILED: 224 * 225 * Creation of an encrypted node failed 226 */ 227 #define LASSO_DS_ERROR_ENCRYPTION_FAILED -119 228 /** 229 * LASSO_DS_ERROR_DECRYPTION_FAILED_MISSING_PRIVATE_KEY: 230 * 231 * Could not decrypt because the private key is not present. 232 */ 233 #define LASSO_DS_ERROR_DECRYPTION_FAILED_MISSING_PRIVATE_KEY 120 234 235 236 /* Server */ 237 /** 238 * LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND: 239 * 240 * The identifier of a provider is unknown to #LassoServer. To register a provider in a #LassoServer 241 * object, you must use the methods lasso_server_add_provider() or 242 * lasso_server_add_provider_from_buffer(). 243 */ 244 #define LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND -201 245 /** 246 * LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED: 247 * 248 * Failed to add new provider. 249 */ 250 #define LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED -202 251 /** 252 * LASSO_SERVER_ERROR_ADD_PROVIDER_PROTOCOL_MISMATCH: 253 * 254 * Failed to add new provider (protocol mismatch). It means that you tried to add a provider 255 * supporting a protocol imcompatible with the protocol declared for your #LassoServer, for example 256 * metadata for ID-FF 1.2 with metadata for SAML 2.0. 257 */ 258 #define LASSO_SERVER_ERROR_ADD_PROVIDER_PROTOCOL_MISMATCH -203 259 /** 260 * LASSO_SERVER_ERROR_SET_ENCRYPTION_PRIVATE_KEY_FAILED: 261 * 262 * Failed to load encryption private key. 263 */ 264 #define LASSO_SERVER_ERROR_SET_ENCRYPTION_PRIVATE_KEY_FAILED 204 265 /** 266 * LASSO_SERVER_ERROR_INVALID_XML: 267 * 268 * Parsed XML is invalid. 269 */ 270 #define LASSO_SERVER_ERROR_INVALID_XML -205 271 /** 272 * LASSO_SERVER_ERROR_NO_PROVIDER_LOADED 273 * 274 * When loading a metadata file it indicates that no provider could be loaded. 275 * It could be because the file is not well formed, or because there is no provider for the 276 * role sought. 277 * 278 */ 279 #define LASSO_SERVER_ERROR_NO_PROVIDER_LOADED 206 280 281 /* Single Logout */ 282 /** 283 * LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE: 284 * 285 * Unsupported protocol profile 286 */ 287 #define LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE -301 288 /** 289 * LASSO_LOGOUT_ERROR_REQUEST_DENIED: 290 * 291 * Request denied by identity provider 292 */ 293 #define LASSO_LOGOUT_ERROR_REQUEST_DENIED 302 294 /** 295 * LASSO_LOGOUT_ERROR_FEDERATION_NOT_FOUND: 296 * 297 * Federation not found on logout 298 */ 299 #define LASSO_LOGOUT_ERROR_FEDERATION_NOT_FOUND 303 300 /** 301 * LASSO_LOGOUT_ERROR_UNKNOWN_PRINCIPAL: 302 * 303 * Unknown principal on logout 304 */ 305 #define LASSO_LOGOUT_ERROR_UNKNOWN_PRINCIPAL 304 306 /** 307 * LASSO_LOGOUT_ERROR_PARTIAL_LOGOUT: 308 * 309 * Logout could not be propagated to every service provider in the current session. 310 */ 311 #define LASSO_LOGOUT_ERROR_PARTIAL_LOGOUT 305 312 313 /* Profile */ 314 /** 315 * LASSO_PROFILE_ERROR_INVALID_QUERY: 316 * 317 * Invalid URL query 318 */ 319 #define LASSO_PROFILE_ERROR_INVALID_QUERY -401 320 /** 321 * LASSO_PROFILE_ERROR_INVALID_POST_MSG: 322 * 323 * Invalid POST message 324 */ 325 #define LASSO_PROFILE_ERROR_INVALID_POST_MSG -402 326 /** 327 * LASSO_PROFILE_ERROR_INVALID_SOAP_MSG: 328 * 329 * Invalid SOAP message 330 */ 331 #define LASSO_PROFILE_ERROR_INVALID_SOAP_MSG -403 332 /** 333 * LASSO_PROFILE_ERROR_MISSING_REQUEST: 334 * 335 * Missing request 336 */ 337 #define LASSO_PROFILE_ERROR_MISSING_REQUEST -404 338 /** 339 * LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD: 340 * 341 * Invalid HTTP method 342 */ 343 #define LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD -405 344 /** 345 * LASSO_PROFILE_ERROR_INVALID_PROTOCOLPROFILE: 346 * 347 * Invalid protocol profile 348 */ 349 #define LASSO_PROFILE_ERROR_INVALID_PROTOCOLPROFILE -406 350 /** 351 * LASSO_PROFILE_ERROR_INVALID_MSG: 352 * 353 * Invalid message 354 */ 355 #define LASSO_PROFILE_ERROR_INVALID_MSG -407 356 /** 357 * LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID: 358 * 359 * ProviderID not found 360 */ 361 #define LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID -408 362 /** 363 * LASSO_PROFILE_ERROR_UNSUPPORTED_PROFILE: 364 * 365 * Unsupported protocol profile 366 */ 367 #define LASSO_PROFILE_ERROR_UNSUPPORTED_PROFILE -409 368 /** 369 * LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL: 370 * 371 * Unable to find Profile URL in metadata 372 */ 373 #define LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL -410 374 /** 375 * LASSO_PROFILE_ERROR_IDENTITY_NOT_FOUND: 376 * 377 * Identity not found 378 */ 379 #define LASSO_PROFILE_ERROR_IDENTITY_NOT_FOUND -411 380 /** 381 * LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND: 382 * 383 * Federation not found 384 */ 385 #define LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND -412 386 /** 387 * LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND: 388 * 389 * Name identifier not found 390 */ 391 #define LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND -413 392 /** 393 * LASSO_PROFILE_ERROR_BUILDING_QUERY_FAILED: 394 * 395 * Error building request QUERY url 396 */ 397 #define LASSO_PROFILE_ERROR_BUILDING_QUERY_FAILED -414 398 /** 399 * LASSO_PROFILE_ERROR_BUILDING_REQUEST_FAILED: 400 * 401 * Error building request object 402 */ 403 #define LASSO_PROFILE_ERROR_BUILDING_REQUEST_FAILED -415 404 /** 405 * LASSO_PROFILE_ERROR_BUILDING_MESSAGE_FAILED: 406 * 407 * Error building request message 408 */ 409 #define LASSO_PROFILE_ERROR_BUILDING_MESSAGE_FAILED -416 410 /** 411 * LASSO_PROFILE_ERROR_BUILDING_RESPONSE_FAILED: 412 * 413 * Error building response object 414 */ 415 #define LASSO_PROFILE_ERROR_BUILDING_RESPONSE_FAILED -417 416 /** 417 * LASSO_PROFILE_ERROR_SESSION_NOT_FOUND: 418 * 419 * Session not found 420 */ 421 #define LASSO_PROFILE_ERROR_SESSION_NOT_FOUND -418 422 /** 423 * LASSO_PROFILE_ERROR_BAD_IDENTITY_DUMP: 424 * 425 * Failed to create identity from dump 426 */ 427 #define LASSO_PROFILE_ERROR_BAD_IDENTITY_DUMP -419 428 /** 429 * LASSO_PROFILE_ERROR_BAD_SESSION_DUMP: 430 * 431 * Failed to create session from dump 432 */ 433 #define LASSO_PROFILE_ERROR_BAD_SESSION_DUMP -420 434 /** 435 * LASSO_PROFILE_ERROR_MISSING_RESPONSE: 436 * 437 * Missing response 438 */ 439 #define LASSO_PROFILE_ERROR_MISSING_RESPONSE -421 440 /** 441 * LASSO_PROFILE_ERROR_MISSING_STATUS_CODE: 442 * 443 * Missing status code 444 */ 445 #define LASSO_PROFILE_ERROR_MISSING_STATUS_CODE -422 446 /** 447 * LASSO_PROFILE_ERROR_MISSING_ARTIFACT: 448 * 449 * Missing SAML artifact 450 */ 451 #define LASSO_PROFILE_ERROR_MISSING_ARTIFACT -423 452 /** 453 * LASSO_PROFILE_ERROR_MISSING_RESOURCE_OFFERING: 454 * 455 * Missing ressource offering 456 */ 457 #define LASSO_PROFILE_ERROR_MISSING_RESOURCE_OFFERING 424 458 /** 459 * LASSO_PROFILE_ERROR_MISSING_SERVICE_DESCRIPTION: 460 * 461 * Missing service description 462 */ 463 #define LASSO_PROFILE_ERROR_MISSING_SERVICE_DESCRIPTION 425 464 /** 465 * LASSO_PROFILE_ERROR_MISSING_SERVICE_TYPE: 466 * 467 * Missing service type 468 */ 469 #define LASSO_PROFILE_ERROR_MISSING_SERVICE_TYPE 426 470 /** 471 * LASSO_PROFILE_ERROR_MISSING_ASSERTION: 472 * 473 * When looking for an assertion we did not found it. 474 */ 475 #define LASSO_PROFILE_ERROR_MISSING_ASSERTION -427 476 /** 477 * LASSO_PROFILE_ERROR_MISSING_SUBJECT: 478 * 479 * Missing subject 480 */ 481 #define LASSO_PROFILE_ERROR_MISSING_SUBJECT -428 482 /** 483 * LASSO_PROFILE_ERROR_MISSING_NAME_IDENTIFIER: 484 * 485 * Missing name identifier 486 */ 487 #define LASSO_PROFILE_ERROR_MISSING_NAME_IDENTIFIER -429 488 /** 489 * LASSO_PROFILE_ERROR_INVALID_ARTIFACT: 490 * 491 * Invalid artifact 492 */ 493 #define LASSO_PROFILE_ERROR_INVALID_ARTIFACT -430 494 /** 495 * LASSO_PROFILE_ERROR_MISSING_ENCRYPTION_PRIVATE_KEY: 496 * 497 * Found an encrypted element but encryption private key is not set 498 */ 499 #define LASSO_PROFILE_ERROR_MISSING_ENCRYPTION_PRIVATE_KEY -431 500 /** 501 * LASSO_PROFILE_ERROR_STATUS_NOT_SUCCESS: 502 * 503 * Status code is not success 504 */ 505 #define LASSO_PROFILE_ERROR_STATUS_NOT_SUCCESS -432 506 /** 507 * LASSO_PROFILE_ERROR_MISSING_ISSUER: 508 * 509 * Missing issuer 510 */ 511 #define LASSO_PROFILE_ERROR_MISSING_ISSUER -433 512 /** 513 * LASSO_PROFILE_ERROR_MISSING_SERVICE_INSTANCE: 514 * 515 * Missing service instance 516 */ 517 #define LASSO_PROFILE_ERROR_MISSING_SERVICE_INSTANCE -434 518 /** 519 * LASSO_PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE: 520 * 521 * Missing endpoint reference 522 */ 523 #define LASSO_PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE -435 524 /** 525 * LASSO_PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE_ADDRESS: 526 * 527 * Missing endpoint reference address 528 */ 529 #define LASSO_PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE_ADDRESS -436 530 /** 531 * LASSO_PROFILE_ERROR_INVALID_ISSUER: 532 * 533 * Assertion issuer is not the same as the requested issuer 534 */ 535 #define LASSO_PROFILE_ERROR_INVALID_ISSUER -437 536 /** 537 * LASSO_PROFILE_ERROR_MISSING_SERVER: 538 * 539 * No server object set in the profile 540 */ 541 #define LASSO_PROFILE_ERROR_MISSING_SERVER -438 542 /** 543 * LASSO_PROFILE_ERROR_UNKNOWN_PROVIDER: 544 * @Deprecated: Since 2.2.3 545 * 546 * The issuer of the message is unknown to us 547 */ 548 #define LASSO_PROFILE_ERROR_UNKNOWN_PROVIDER 439 549 /** 550 * LASSO_PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE: 551 * 552 * The profile cannot verify a signature on the message 553 */ 554 #define LASSO_PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE 440 555 /** 556 * LASSO_PROFILE_ERROR_CANNOT_FIND_A_PROVIDER: 557 * 558 * Profile was called without a specific provider and we cannot find one. 559 */ 560 #define LASSO_PROFILE_ERROR_CANNOT_FIND_A_PROVIDER -441 561 /** 562 * LASSO_PROFILE_ERROR_RESPONSE_DOES_NOT_MATCH_REQUEST: 563 * 564 * Received response does not refer to the request sent 565 */ 566 #define LASSO_PROFILE_ERROR_RESPONSE_DOES_NOT_MATCH_REQUEST -442 567 /** 568 * LASSO_PROFILE_ERROR_INVALID_REQUEST: 569 * 570 * Received request is not of the expected type. 571 */ 572 #define LASSO_PROFILE_ERROR_INVALID_REQUEST 443 573 574 /* 575 * LASSO_PROFILE_ERROR_INVALID_REQUEST: 576 * 577 * Received request is not of the expected type. 578 */ 579 #define LASSO_PROFILE_ERROR_INVALID_RESPONSE 444 580 /** 581 * LASSO_PROFILE_ERROR_UNSUPPPORTED_BINDING 582 * 583 * The responder reported that he does not support this binding 584 */ 585 #define LASSO_PROFILE_ERROR_UNSUPPORTED_BINDING 445 586 /** 587 * LASSO_PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS: 588 * 589 * An assertion conditions could not be validated. 590 */ 591 #define LASSO_PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS 446 592 /** 593 * LASSO_PROFILE_ERROR_INVALID_ASSERTION: 594 * 595 * The assertion is malformed, Issuer differs from NameQualifier of the subject, signature cannot be 596 * verified. 597 */ 598 #define LASSO_PROFILE_ERROR_INVALID_ASSERTION 447 599 /** 600 * LASSO_PROFILE_ERROR_UNKNOWN_ISSUER: 601 * 602 * The issuer of an assertion is unkown to us. 603 */ 604 #define LASSO_PROFILE_ERROR_UNKNOWN_ISSUER 448 605 /** 606 * LASSO_PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP 607 * 608 * The issuer of an assertion is not considered as an IdP 609 */ 610 #define LASSO_PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP 449 611 /** 612 * LASSO_PROFILE_ERROR_REQUEST_DENIED: 613 * 614 * Generic error when an IdP or an SP return the RequestDenied status code in its response. 615 * 616 */ 617 #define LASSO_PROFILE_ERROR_REQUEST_DENIED 450 618 /** 619 * LASSO_PROFILE_ERROR_ENDPOINT_INDEX_NOT_FOUND 620 * 621 * A received artifact contains an andpoint index which does not exist in the metadata of the 622 * corresponding provider. 623 */ 624 #define LASSO_PROFILE_ERROR_ENDPOINT_INDEX_NOT_FOUND 451 625 /** 626 * LASSO_PROFILE_ERROR_INVALID_IDP_LIST 627 * 628 * The IDP list is invalid 629 */ 630 #define LASSO_PROFILE_ERROR_INVALID_IDP_LIST 452 631 632 /* functions/methods parameters checking */ 633 /** 634 * LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ: 635 * 636 * An object type provided as parameter is invalid or object is NULL. 637 */ 638 #define LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ -501 639 /** 640 * LASSO_PARAM_ERROR_INVALID_VALUE: 641 * 642 * A parameter value is invalid. 643 */ 644 #define LASSO_PARAM_ERROR_INVALID_VALUE -502 645 /** 646 * LASSO_PARAM_ERROR_CHECK_FAILED: 647 * 648 * The error return location should be either NULL or contains a NULL error. 649 */ 650 #define LASSO_PARAM_ERROR_CHECK_FAILED -503 651 /** 652 * LASSO_PARAM_ERROR_NON_INITIALIZED_OBJECT: 653 * 654 * The call failed because an argument is a partially-initialized object. 655 */ 656 #define LASSO_PARAM_ERROR_NON_INITIALIZED_OBJECT -504 657 658 /* Single Sign-On */ 659 /** 660 * LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND: 661 * 662 * Federation not found on login 663 */ 664 #define LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND 601 665 /** 666 * LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED: 667 * 668 * Consent of the principal was not obtained. 669 */ 670 #define LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED 602 671 /** 672 * LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY: 673 * 674 * Invalid NameIDPolicy in lib:AuthnRequest 675 */ 676 #define LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY -603 677 /** 678 * LASSO_LOGIN_ERROR_REQUEST_DENIED: 679 * 680 * Request denied. 681 */ 682 #define LASSO_LOGIN_ERROR_REQUEST_DENIED 604 683 /** 684 * LASSO_LOGIN_ERROR_INVALID_SIGNATURE: 685 * 686 * The signature of a message or of an assertion is invalid. That is badly computed or with an 687 * unknown key. 688 */ 689 #define LASSO_LOGIN_ERROR_INVALID_SIGNATURE 605 690 /** 691 * LASSO_LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST: 692 * 693 * An unsigned authn request was received but the metadata specify that they must be signed. 694 */ 695 #define LASSO_LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST 606 696 /** 697 * LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS: 698 * 699 * Status code is not success 700 */ 701 #define LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS 607 702 /** 703 * LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL: 704 * 705 * Unknown principal 706 */ 707 #define LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL 608 708 /** 709 * LASSO_LOGIN_ERROR_NO_DEFAULT_ENDPOINT: 710 * 711 * No default endpoint 712 */ 713 #define LASSO_LOGIN_ERROR_NO_DEFAULT_ENDPOINT 609 714 /** 715 * LASSO_LOGIN_ERROR_ASSERTION_REPLAY: 716 * 717 * Assertion replay 718 */ 719 #define LASSO_LOGIN_ERROR_ASSERTION_REPLAY 610 720 /** 721 * LASSO_LOGIN_ERROR_ASSERTION_DOES_NOT_MATCH_REQUEST_ID: 722 * 723 * If inResponseTo attribute is present, a matching request must be present too in the LassoLogin object 724 */ 725 #define LASSO_LOGIN_ERROR_ASSERTION_DOES_NOT_MATCH_REQUEST_ID 611 726 727 /** 728 * LASSO_LOGIN_ERROR_INVALID_ASSERTION_SIGNATURE: 729 * 730 * Signature on an assertion could not be verified. 731 */ 732 #define LASSO_LOGIN_ERROR_INVALID_ASSERTION_SIGNATURE 612 733 734 /* Federation Termination Notification */ 735 /** 736 * LASSO_DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER: 737 * 738 * Name identifier not found in request 739 */ 740 #define LASSO_DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER -700 741 742 /* Soap */ 743 /** 744 * LASSO_SOAP_ERROR_REDIRECT_REQUEST_FAULT: 745 * 746 * A SOAP Fault containing a Redirect Request was received 747 */ 748 #define LASSO_SOAP_ERROR_REDIRECT_REQUEST_FAULT 800 749 #define LASSO_SOAP_FAULT_REDIRECT_REQUEST LASSO_SOAP_ERROR_REDIRECT_REQUEST_FAULT 750 751 /** 752 * LASSO_SOAP_ERROR_MISSING_ENVELOPE: 753 * 754 * Missing SOAP envelope 755 */ 756 #define LASSO_SOAP_ERROR_MISSING_ENVELOPE -801 757 /** 758 * LASSO_SOAP_ERROR_MISSING_HEADER: 759 * 760 * Missing SOAP header 761 */ 762 #define LASSO_SOAP_ERROR_MISSING_HEADER -802 763 /** 764 * LASSO_SOAP_ERROR_MISSING_BODY: 765 * 766 * Missing SOAP body 767 */ 768 #define LASSO_SOAP_ERROR_MISSING_BODY -803 769 /** 770 * LASSO_SOAP_ERROR_MISSING_SOAP_FAULT_DETAIL: 771 * 772 * Missing SOAP fault detail 773 */ 774 #define LASSO_SOAP_ERROR_MISSING_SOAP_FAULT_DETAIL -804 775 776 /* Name Identifier Mapping */ 777 /** 778 * LASSO_NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_NAMESPACE: 779 * 780 * Target name space not found 781 */ 782 #define LASSO_NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_NAMESPACE -900 783 #define LASSO_NAME_IDENTIFIER_MAPPING_ERROR_FORBIDDEN_CALL_ON_THIS_SIDE -901 784 #define LASSO_NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_IDENTIFIER -902 785 786 /* Data Service */ 787 #define LASSO_DATA_SERVICE_ERROR_UNREGISTERED_DST -1000 788 #define LASSO_DATA_SERVICE_ERROR_CANNOT_ADD_ITEM -1001 789 790 /* WSF Profile */ 791 /** 792 * LASSO_WSF_PROFILE_ERROR_MISSING_CORRELATION: 793 * 794 * Correlation SOAP Header is missing 795 */ 796 #define LASSO_WSF_PROFILE_ERROR_MISSING_CORRELATION -1100 797 /** 798 * LASSO_WSF_PROFILE_ERROR_MISSING_SECURITY: 799 * 800 * Security SOAP Header is missing 801 */ 802 #define LASSO_WSF_PROFILE_ERROR_MISSING_SECURITY -1101 803 /** 804 * LASSO_WSF_PROFILE_ERROR_MISSING_ASSERTION_ID: 805 * 806 * AssertionID attribute is missing 807 */ 808 #define LASSO_WSF_PROFILE_ERROR_MISSING_ASSERTION_ID -1102 809 /** 810 * LASSO_WSF_PROFILE_ERROR_MISSING_ENDPOINT: 811 * 812 * Cannot find an WSP endpoint for the ID-WSF service 813 */ 814 #define LASSO_WSF_PROFILE_ERROR_MISSING_ENDPOINT -1103 815 /** 816 * LASSO_WSF_PROFILE_ERROR_SOAP_FAULT: 817 * 818 * SOAP ID-WSF binding returned a SOAP fault 819 */ 820 #define LASSO_WSF_PROFILE_ERROR_SOAP_FAULT 1104 821 /** 822 * LASSO_WSF_PROFILE_ERROR_UNSUPPORTED_SECURITY_MECHANISM: 823 * 824 * The specified security mechanism is not supported by lasso ID-WSF library 825 */ 826 #define LASSO_WSF_PROFILE_ERROR_UNSUPPORTED_SECURITY_MECHANISM 1105 827 /** 828 * LASSO_WSF_PROFILE_ERROR_MISSING_DESCRIPTION: 829 * 830 * No ID-WSF web Service description could be found for the current security mechanism 831 */ 832 #define LASSO_WSF_PROFILE_ERROR_MISSING_DESCRIPTION -1106 833 /** 834 * LASSO_WSF_PROFILE_ERROR_MISSING_RESOURCE_ID: 835 * 836 * The necessary ResourceID or EncryptedResourceID for calling an ID-WSF service is missing. 837 */ 838 #define LASSO_WSF_PROFILE_ERROR_MISSING_RESOURCE_ID -1107 839 /** 840 * LASSO_WSF_PROFILE_ERROR_MISSING_CREDENTIAL_REF: 841 * 842 * WS-Security SAML Token secmech needs a CredentialRef 843 */ 844 #define LASSO_WSF_PROFILE_ERROR_MISSING_CREDENTIAL_REF -1108 845 /** 846 * LASSO_WSF_PROFILE_ERROR_INVALID_OR_MISSING_REFERENCE_TO_MESSAGE_ID: 847 * 848 * refToMessageID attribute of the Corrrelation header does not match the SOAP request 849 */ 850 #define LASSO_WSF_PROFILE_ERROR_INVALID_OR_MISSING_REFERENCE_TO_MESSAGE_ID -1109 851 /** 852 * LASSO_WSF_PROFILE_ERROR_SECURITY_MECHANISM_CHECK_FAILED: 853 * 854 * Check for a security mechanism upon a received request failed. 855 */ 856 #define LASSO_WSF_PROFILE_ERROR_SECURITY_MECHANISM_CHECK_FAILED 1110 857 858 /** 859 * LASSO_WSF_PROFILE_ERROR_UNKNOWN_STATUS_CODE: 860 * 861 * A response contained an unknown status code. 862 */ 863 #define LASSO_WSF_PROFILE_ERROR_UNKNOWN_STATUS_CODE 1112 864 /** 865 * LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED: 866 * 867 * A interaction is required but the sender did not allow use to make interact redirect requests. 868 */ 869 #define LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED 1113 870 /** 871 * LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED_FOR_DATA: 872 * 873 * A interaction is required to get fresh datas but the sender did not allow use to make interact 874 * redirect requests. 875 */ 876 #define LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED_FOR_DATA 1114 877 /** 878 * LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST: 879 * 880 * The last parsed response contained a SOAP fault with a RedirectRequest element. 881 */ 882 #define LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST 1115 883 /** 884 * LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER: 885 * 886 * The requester does not support SOAP Fault containing RedirectRequest elements. So it is not 887 * possible to use lasso_idwsf2_profile_redirect_user_for_interaction(). 888 */ 889 #define LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER 1116 890 /** 891 * LASSO_WSF_PROFILE_ERROR_MISSING_SENDER_ID: 892 * 893 * The received ID-WSF request miss a Sender id. 894 */ 895 #define LASSO_WSF_PROFILE_ERROR_MISSING_SENDER_ID 1117 896 897 898 /* ID-WSF 2 Discovery */ 899 /** 900 * LASSO_DISCOVERY_ERROR_SVC_METADATA_REGISTER_FAILED: 901 * 902 * Service metadata registration failed 903 */ 904 #define LASSO_DISCOVERY_ERROR_SVC_METADATA_REGISTER_FAILED -1200 905 /** 906 * LASSO_DISCOVERY_ERROR_SVC_METADATA_ASSOCIATION_ADD_FAILED: 907 * 908 * Service metadata association failed 909 */ 910 #define LASSO_DISCOVERY_ERROR_SVC_METADATA_ASSOCIATION_ADD_FAILED -1201 911 /** 912 * LASSO_DISCOVERY_ERROR_MISSING_REQUESTED_SERVICE: 913 * 914 * Missing requested service 915 */ 916 #define LASSO_DISCOVERY_ERROR_MISSING_REQUESTED_SERVICE -1202 917 /** 918 * LASSO_DISCOVERY_ERROR_FAILED_TO_BUILD_ENDPOINT_REFERENCE: 919 * 920 * Failed to build Endpoint Reference 921 */ 922 #define LASSO_DISCOVERY_ERROR_FAILED_TO_BUILD_ENDPOINT_REFERENCE -1203 923 924 /* ID-WSF 2 Data Service */ 925 /** 926 * LASSO_DST_ERROR_MISSING_SERVICE_DATA: 927 * 928 * Missing service data 929 */ 930 #define LASSO_DST_ERROR_MISSING_SERVICE_DATA -1300 931 /** 932 * LASSO_DST_ERROR_QUERY_FAILED: 933 * 934 * Query failed 935 */ 936 #define LASSO_DST_ERROR_QUERY_FAILED -1301 937 /** 938 * LASSO_DST_ERROR_QUERY_PARTIALLY_FAILED: 939 * 940 * Query partially failed : some items were correctly processed 941 */ 942 #define LASSO_DST_ERROR_QUERY_PARTIALLY_FAILED -1302 943 /** 944 * LASSO_DST_ERROR_MODIFY_FAILED: 945 * 946 * Modify failed 947 */ 948 #define LASSO_DST_ERROR_MODIFY_FAILED -1303 949 /** 950 * LASSO_DST_ERROR_MODIFY_PARTIALLY_FAILED: 951 * 952 * Modify partially failed : some items were correctly processed 953 */ 954 #define LASSO_DST_ERROR_MODIFY_PARTIALLY_FAILED -1304 955 /** 956 * LASSO_DST_ERROR_NEW_DATA_MISSING: 957 * 958 * Missing new data 959 */ 960 #define LASSO_DST_ERROR_NEW_DATA_MISSING -1305 961 /** 962 * LASSO_DST_ERROR_QUERY_NOT_FOUND: 963 * 964 * Looked query is not found 965 */ 966 #define LASSO_DST_ERROR_QUERY_NOT_FOUND -1306 967 /** 968 * LASSO_DST_ERROR_NO_DATA: 969 * 970 * No data or no data for the designated query item in the query response 971 */ 972 #define LASSO_DST_ERROR_NO_DATA -1307 973 /** 974 * LASSO_DST_ERROR_MALFORMED_QUERY: 975 * 976 * QueryObject is malformed 977 */ 978 #define LASSO_DST_ERROR_MALFORMED_QUERY -1308 979 /** 980 * LASSO_DST_ERROR_EMPTY_REQUEST 981 * 982 * Request is empty. 983 */ 984 #define LASSO_DST_ERROR_EMPTY_REQUEST -1309 985 986 /* Lasso registry */ 987 /** 988 * LASSO_REGISTRY_ERROR_KEY_EXISTS: 989 * 990 * Key alreadys exists in the registry 991 */ 992 #define LASSO_REGISTRY_ERROR_KEY_EXISTS -1400 993 994 /* Lasso provider */ 995 /** 996 * LASSO_PROVIDER_ERROR_MISSING_PUBLIC_KEY: 997 * 998 * The provider has no known public key 999 */ 1000 #define LASSO_PROVIDER_ERROR_MISSING_PUBLIC_KEY -1500 1001 1002 /* WS-Security */ 1003 /** 1004 * LASSO_WSSEC_ERROR_MISSING_SECURITY_TOKEN: 1005 * 1006 * The request miss a WS-Security token. 1007 */ 1008 #define LASSO_WSSEC_ERROR_MISSING_SECURITY_TOKEN 1600 1009 1010 /** 1011 * LASSO_WSSEC_ERROR_BAD_PASSWORD: 1012 * 1013 * The known password does not match the UsernameToken 1014 */ 1015 #define LASSO_WSSEC_ERROR_BAD_PASSWORD 1601 1016 1017 /* ID-WSF 2.0 Discovery Service */ 1018 /** 1019 * LASSO_IDWSF2_DISCOVERY_ERROR_FAILED: 1020 * 1021 * Last discovery request failed. 1022 */ 1023 #define LASSO_IDWSF2_DISCOVERY_ERROR_FAILED 1700 1024 /** 1025 * LASSO_IDWSF2_DISCOVERY_ERROR_FORBIDDEN: 1026 * 1027 * Last discovery request is forbidden by policy. 1028 */ 1029 #define LASSO_IDWSF2_DISCOVERY_ERROR_FORBIDDEN 1701 1030 /** 1031 * LASSO_IDWSF2_DISCOVERY_ERROR_DUPLICATE: 1032 * 1033 * Last discovery request was denied because it would result in duplicate data in the service 1034 */ 1035 #define LASSO_IDWSF2_DISCOVERY_ERROR_DUPLICATE 1702 1036 /** 1037 * LASSO_IDWSF2_DISCOVERY_ERROR_LOGICAL_DUPLICATE: 1038 * 1039 * Last discovery request was denied because it would result in logically duplicate data in the service 1040 */ 1041 #define LASSO_IDWSF2_DISCOVERY_ERROR_LOGICAL_DUPLICATE 1703 1042 /** 1043 * LASSO_IDWSF2_DISCOVERY_ERROR_NO_RESULTS: 1044 * 1045 * The discovery query had no matching results. 1046 */ 1047 #define LASSO_IDWSF2_DISCOVERY_ERROR_NO_RESULTS 1704 1048 /** 1049 * LASSO_IDWSF2_DISCOVERY_ERROR_NOT_FOUND: 1050 * 1051 * The specified item(s) were not found. 1052 */ 1053 #define LASSO_IDWSF2_DISCOVERY_ERROR_NOT_FOUND 1705 1054 1055 /* ID-WSF 2.0 Data Service Template */ 1056 1057 /** 1058 * LASSO_IDWSF2_DST_ERROR_DUPLICATE_ITEM: 1059 * 1060 * A call to add a new item would result in duplicate items. 1061 */ 1062 #define LASSO_IDWSF2_DST_ERROR_DUPLICATE_ITEM -1801 1063 1064 /** 1065 * LASSO_IDWSF2_DST_ERROR_PARTIAL_FAILURE: 1066 * 1067 * Server responded with a partial failure status code. 1068 */ 1069 #define LASSO_IDWSF2_DST_ERROR_PARTIAL_FAILURE 1802 1070 1071 /** 1072 * LASSO_IDWSF2_DST_ERROR_UNKNOWN_STATUS_CODE: 1073 * 1074 * Server response with an unknown status code. 1075 */ 1076 #define LASSO_IDWSF2_DST_ERROR_UNKNOWN_STATUS_CODE 1803 1077 /** 1078 * LASSO_IDWSF2_DST_ERROR_ITEM_NOT_FOUND: 1079 * 1080 * The item_id was not found in the current query request. 1081 */ 1082 #define LASSO_IDWSF2_DST_ERROR_ITEM_NOT_FOUND 1804 1083 1084 /** 1085 * LASSO_ASSERTION_QUERY_ERROR_ATTRIBUTE_REQUEST_ALREADY_EXIST: 1086 * 1087 * Tried to add the same attribute request a second time. 1088 */ 1089 #define LASSO_ASSERTION_QUERY_ERROR_ATTRIBUTE_REQUEST_ALREADY_EXIST 1901 1090 1091 /** 1092 * LASSO_ASSERTION_QUERY_ERROR_NOT_AN_ATTRIBUTE_QUERY 1093 * 1094 * The current assertion query does not contain an attribute query. 1095 */ 1096 #define LASSO_ASSERTION_QUERY_ERROR_NOT_AN_ATTRIBUTE_QUERY 1902 1097 1098 /** 1099 * LASSO_XMLENC_ERROR_INVALID_ENCRYPTED_DATA 1100 * 1101 * The EncryptedData node is invalid, look at the logs. 1102 */ 1103 #define LASSO_XMLENC_ERROR_INVALID_ENCRYPTED_DATA -2001 1104 1105 /** 1106 * LASSO_PAOS_ERROR_MISSING_REQUEST 1107 * 1108 * Missing PAOS Request 1109 */ 1110 #define LASSO_PAOS_ERROR_MISSING_REQUEST -2101 1111 /** 1112 * LASSO_PAOS_ERROR_MISSING_RESPONSE 1113 * 1114 * Missing PAOS Response 1115 */ 1116 #define LASSO_PAOS_ERROR_MISSING_RESPONSE -2102 1117 /** 1118 * LASSO_PAOS_ERROR_MISSING_RESPONSE_CONSUMER_URL 1119 * 1120 * Missing paos:Request responseConsumerURL 1121 */ 1122 #define LASSO_PAOS_ERROR_MISSING_RESPONSE_CONSUMER_URL -2103 1123 1124 /** 1125 * LASSO_ECP_ERROR_MISSING_REQUEST 1126 * 1127 * Missing ECP Request 1128 */ 1129 #define LASSO_ECP_ERROR_MISSING_REQUEST -2201 1130 /** 1131 * LASSO_ECP_ERROR_MISSING_RESPONSE 1132 * 1133 * Missing ECP Response 1134 */ 1135 #define LASSO_ECP_ERROR_MISSING_RESPONSE -2202 1136 /** 1137 * LASSO_ECP_ERROR_MISSING_RELAYSTATE 1138 * 1139 * Missing ECP RelayState 1140 */ 1141 #define LASSO_ECP_ERROR_MISSING_RELAYSTATE -2203 1142 /** 1143 * LASSO_ECP_ERROR_MISSING_AUTHN_REQUEST 1144 * 1145 * Missing samlp:AuthnRequest in ECP request 1146 */ 1147 #define LASSO_ECP_ERROR_MISSING_AUTHN_REQUEST -2204 1148 /** 1149 * LASSO_ECP_ERROR_MISSING_SAML_RESPONSE 1150 * 1151 * Missing samlp:Response in IdP ECP response 1152 */ 1153 #define LASSO_ECP_ERROR_MISSING_SAML_RESPONSE -2205 1154 /** 1155 * LASSO_ECP_ERROR_ASSERTION_CONSUMER_URL_MISMATCH 1156 * 1157 * The ecp:Request responseConsumerURL and ecp:Response AssertionConsumerURL do not match 1158 */ 1159 #define LASSO_ECP_ERROR_ASSERTION_CONSUMER_URL_MISMATCH -2206 1160