diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 088c9959804fd770a6a94d1af9adf5b37b380229..5479765a089de34b2b5bf7195c4ff8b588827ea1 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -5,6 +5,10 @@ module Gitlab
              :dark_scheme, :theme_id, :state, :created_at, :extern_uid, :provider
     end
 
+    class UserSafe < Grape::Entity
+      expose :name
+    end
+
     class UserBasic < Grape::Entity
       expose :id, :username, :email, :name, :state, :created_at
     end
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index c85c01f87bb17ecfb302d8f6c70f360b46a191e3..22ac49c6be86e90875064385302577964c40a88a 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -44,7 +44,7 @@ module Gitlab
       #
       get "/discover" do
         key = Key.find(params[:key_id])
-        present key.user, with: Entities::User
+        present key.user, with: Entities::UserSafe
       end
 
       get "/check" do