Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
ceeaab65
Commit
ceeaab65
authored
Aug 05, 2020
by
ls1947
Browse files
add command an from parameters to authorized keys
parent
d0ccb136
Changes
1
Hide whitespace changes
Inline
Side-by-side
bwreg-service/src/main/java/edu/kit/scc/webreg/service/ssh/SshLoginServiceImpl.java
View file @
ceeaab65
...
...
@@ -18,6 +18,7 @@ import edu.kit.scc.webreg.entity.RegistryEntity;
import
edu.kit.scc.webreg.entity.RegistryStatus
;
import
edu.kit.scc.webreg.entity.ServiceEntity
;
import
edu.kit.scc.webreg.entity.SshPubKeyRegistryEntity
;
import
edu.kit.scc.webreg.entity.SshPubKeyUsageType
;
import
edu.kit.scc.webreg.entity.UserEntity
;
import
edu.kit.scc.webreg.entity.UserLoginInfoEntity
;
import
edu.kit.scc.webreg.entity.UserLoginInfoStatus
;
...
...
@@ -180,6 +181,13 @@ public class SshLoginServiceImpl implements SshLoginService {
protected
String
buildKeyList
(
List
<
SshPubKeyRegistryEntity
>
regKeyList
,
UserEntity
user
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
SshPubKeyRegistryEntity
regKey
:
regKeyList
)
{
if
(
regKey
.
getUsageType
().
equals
(
SshPubKeyUsageType
.
COMMAND
))
{
sb
.
append
(
"command="
);
sb
.
append
(
regKey
.
getCommand
());
sb
.
append
(
" from="
);
sb
.
append
(
regKey
.
getFrom
());
sb
.
append
(
" "
);
}
sb
.
append
(
regKey
.
getSshPubKey
().
getKeyType
());
sb
.
append
(
" "
);
sb
.
append
(
regKey
.
getSshPubKey
().
getEncodedKey
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment