View Javadoc
1   package org.metricshub.ipmi.core.coding.commands.session;
2   
3   /*-
4    * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
5    * IPMI Java Client
6    * ჻჻჻჻჻჻
7    * Copyright 2023 Verax Systems, MetricsHub
8    * ჻჻჻჻჻჻
9    * This program is free software: you can redistribute it and/or modify
10   * it under the terms of the GNU Lesser General Public License as
11   * published by the Free Software Foundation, either version 3 of the
12   * License, or (at your option) any later version.
13   *
14   * This program is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   * GNU General Lesser Public License for more details.
18   *
19   * You should have received a copy of the GNU General Lesser Public
20   * License along with this program.  If not, see
21   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
22   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
23   */
24  
25  import java.util.Collection;
26  
27  import org.metricshub.ipmi.core.coding.commands.ResponseData;
28  import org.metricshub.ipmi.core.coding.protocol.AuthenticationType;
29  
30  /**
31   * A wrapper for Get Channel Authentication Capabilities command response
32   * @see GetChannelAuthenticationCapabilities
33   */
34  public class GetChannelAuthenticationCapabilitiesResponseData implements ResponseData {
35      /**
36       * Channel number that the Authentication Capabilities is being returned for.
37       */
38      private byte channelNumber;
39  
40      /**
41       * IPMI v2.0 support.
42       */
43      private boolean ipmiv20Support;
44  
45      /**
46       * Authentication Types supported for requested privilege level.
47       */
48      private Collection<AuthenticationType> authenticationTypes;
49  
50      /**
51       * BMC key used for authentication. If false, then BMC uses user key. 
52       */
53      private boolean kgEnabled;
54  
55      /**
56       * If Mer-message Authentication is enabled, packets to the BMC must be authenticated per Authentication Type used
57       * to activate the session, and User Level Authentication setting, following. Otherwise, Authentication Type 'None'
58       * accepted for packets to the BMC after the session has been activated.
59       */
60      private boolean perMessageAuthenticationEnabled;
61  
62      /**
63       * If User Level Authentication is enabled, User Level commands must be authenticated per Authentication Type used
64       * to activate the session. Otherwise, Authentication Type 'none' accepted for User Level commands to the BMC.
65       */
66      private boolean userLevelAuthenticationEnabled;
67  
68      /**
69       * One or more users are enabled that have non-null usernames
70       */
71      private boolean nonNullUsernamesEnabled;
72  
73      /**
74       * One or more users that have a null username, but non-null password, are presently enabled
75       */
76      private boolean nullUsernamesEnabled;
77  
78      /**
79       * A user that has a null username and null password is presently enabled
80       */
81      private boolean anonymusLoginEnabled;
82  
83      /**
84       * IANA Enterprise Number for OEM/Organization that specified the particular OEM Authentication Type for RMCP.
85       */
86      private int oemId;
87  
88      /**
89       * Additional OEM-specific information for the OEM Authentication Type for RMCP.
90       */
91      private byte oemData;
92  
93      public void setChannelNumber(byte channelNumber) {
94          this.channelNumber = channelNumber;
95      }
96  
97      public byte getChannelNumber() {
98          return channelNumber;
99      }
100 
101     public void setIpmiv20Support(boolean ipmiv20Support) {
102         this.ipmiv20Support = ipmiv20Support;
103     }
104 
105     public boolean isIpmiv20Support() {
106         return ipmiv20Support;
107     }
108 
109     public void setAuthenticationTypes(Collection<AuthenticationType> authenticationTypes) {
110         this.authenticationTypes = authenticationTypes;
111     }
112 
113     public Collection<AuthenticationType> getAuthenticationTypes() {
114         return authenticationTypes;
115     }
116 
117     public void setKgEnabled(boolean kgEnabled) {
118         this.kgEnabled = kgEnabled;
119     }
120 
121     public boolean isKgEnabled() {
122         return kgEnabled;
123     }
124 
125     public void setPerMessageAuthenticationEnabled(boolean perMessageAuthenticationEnabled) {
126         this.perMessageAuthenticationEnabled = perMessageAuthenticationEnabled;
127     }
128 
129     public boolean isPerMessageAuthenticationEnabled() {
130         return perMessageAuthenticationEnabled;
131     }
132 
133     public void setUserLevelAuthenticationEnabled(boolean userLevelAuthenticationEnabled) {
134         this.userLevelAuthenticationEnabled = userLevelAuthenticationEnabled;
135     }
136 
137     public boolean isUserLevelAuthenticationEnabled() {
138         return userLevelAuthenticationEnabled;
139     }
140 
141     public void setNonNullUsernamesEnabled(boolean nonNullUsernamesEnabled) {
142         this.nonNullUsernamesEnabled = nonNullUsernamesEnabled;
143     }
144 
145     public boolean isNonNullUsernamesEnabled() {
146         return nonNullUsernamesEnabled;
147     }
148 
149     public void setNullUsernamesEnabled(boolean nullUsernamesEnabled) {
150         this.nullUsernamesEnabled = nullUsernamesEnabled;
151     }
152 
153     public boolean isNullUsernamesEnabled() {
154         return nullUsernamesEnabled;
155     }
156 
157     public void setAnonymusLoginEnabled(boolean anonymusLoginEnabled) {
158         this.anonymusLoginEnabled = anonymusLoginEnabled;
159     }
160 
161     public boolean isAnonymusLoginEnabled() {
162         return anonymusLoginEnabled;
163     }
164 
165     public void setOemId(int oemId) {
166         this.oemId = oemId;
167     }
168 
169     public int getOemId() {
170         return oemId;
171     }
172 
173     public void setOemData(byte oemData) {
174         this.oemData = oemData;
175     }
176 
177     public byte getOemData() {
178         return oemData;
179     }
180 }