Security.proto 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. /**
  19. * These .proto interfaces are private and stable.
  20. * Please see https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Compatibility.html
  21. * for what changes are allowed for a *stable* .proto interface.
  22. */
  23. syntax = "proto2";
  24. option java_package = "org.apache.hadoop.security.proto";
  25. option java_outer_classname = "SecurityProtos";
  26. option java_generic_services = true;
  27. option java_generate_equals_and_hash = true;
  28. package hadoop.common;
  29. /**
  30. * Security token identifier
  31. */
  32. message TokenProto {
  33. required bytes identifier = 1;
  34. required bytes password = 2;
  35. required string kind = 3;
  36. required string service = 4;
  37. }
  38. message CredentialsKVProto {
  39. required string alias = 1;
  40. optional hadoop.common.TokenProto token = 2;
  41. optional bytes secret = 3;
  42. }
  43. message CredentialsProto {
  44. repeated hadoop.common.CredentialsKVProto tokens = 1;
  45. repeated hadoop.common.CredentialsKVProto secrets = 2;
  46. }
  47. message GetDelegationTokenRequestProto {
  48. required string renewer = 1;
  49. }
  50. message GetDelegationTokenResponseProto {
  51. optional hadoop.common.TokenProto token = 1;
  52. }
  53. message RenewDelegationTokenRequestProto {
  54. required hadoop.common.TokenProto token = 1;
  55. }
  56. message RenewDelegationTokenResponseProto {
  57. required uint64 newExpiryTime = 1;
  58. }
  59. message CancelDelegationTokenRequestProto {
  60. required hadoop.common.TokenProto token = 1;
  61. }
  62. message CancelDelegationTokenResponseProto { // void response
  63. }